]> granicus.if.org Git - clang/commitdiff
Revert my available_externally vtables experiment. It's breaking the LLVM-with-Clang...
authorDouglas Gregor <dgregor@apple.com>
Wed, 6 Jan 2010 04:50:56 +0000 (04:50 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 6 Jan 2010 04:50:56 +0000 (04:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92822 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGVtable.cpp
test/CodeGenCXX/vtable-linkage.cpp

index d89c6692f6e327d51460936117cedb8f29217656..2cb877bf4d25655417f7e639ac4858209f2dcbf7 100644 (file)
@@ -1506,7 +1506,10 @@ void CGVtableInfo::MaybeEmitVtable(GlobalDecl GD) {
       break;
 
     case TSK_ExplicitInstantiationDeclaration:
-      Linkage = llvm::GlobalVariable::AvailableExternallyLinkage;
+      // FIXME: Use available_externally linkage. However, this currently
+      // breaks LLVM's build due to undefined symbols.
+      //      Linkage = llvm::GlobalVariable::AvailableExternallyLinkage;
+      Linkage = llvm::GlobalVariable::WeakODRLinkage;
       break;
     }
   }
@@ -1523,7 +1526,9 @@ void CGVtableInfo::MaybeEmitVtable(GlobalDecl GD) {
       break;
 
     case TSK_ExplicitInstantiationDeclaration:
-      Linkage = llvm::GlobalVariable::AvailableExternallyLinkage;
+      // FIXME: Use available_externally linkage. However, this currently
+      // breaks LLVM's build due to undefined symbols.
+      // Linkage = llvm::GlobalVariable::AvailableExternallyLinkage;
       break;
     }
   }
index 5738007041830c9ff7ab879f067856cd6eeea501..eaefdfa68d2c7ea05c10e41bb894b005dd62a0a4 100644 (file)
@@ -125,7 +125,7 @@ void use_F(F<char> &fc) {
 
 // F<int> is an explicit template instantiation declaration without a
 // key function, so its vtable should have weak_odr linkage.
-// CHECK: @_ZTV1FIiE = available_externally constant
+// CHECK: @_ZTV1FIiE = weak_odr constant
 
 // E<int> is an explicit template instantiation declaration. It has a
 // key function that is not instantiation, so we should only reference