[cfe-commits] r92822 - in /cfe/trunk: lib/CodeGen/CGVtable.cpp test/CodeGenCXX/vtable-linkage.cpp

Douglas Gregor dgregor at apple.com
Tue Jan 5 20:50:56 PST 2010


Author: dgregor
Date: Tue Jan  5 22:50:56 2010
New Revision: 92822

URL: http://llvm.org/viewvc/llvm-project?rev=92822&view=rev
Log:
Revert my available_externally vtables experiment. It's breaking the LLVM-with-Clang build with linker errors that I have yet to investigate.

Modified:
    cfe/trunk/lib/CodeGen/CGVtable.cpp
    cfe/trunk/test/CodeGenCXX/vtable-linkage.cpp

Modified: cfe/trunk/lib/CodeGen/CGVtable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVtable.cpp?rev=92822&r1=92821&r2=92822&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGVtable.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVtable.cpp Tue Jan  5 22:50:56 2010
@@ -1506,7 +1506,10 @@
       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 @@
       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;
     }
   }

Modified: cfe/trunk/test/CodeGenCXX/vtable-linkage.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/vtable-linkage.cpp?rev=92822&r1=92821&r2=92822&view=diff

==============================================================================
--- cfe/trunk/test/CodeGenCXX/vtable-linkage.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/vtable-linkage.cpp Tue Jan  5 22:50:56 2010
@@ -125,7 +125,7 @@
 
 // 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





More information about the cfe-commits mailing list