From: Douglas Gregor Date: Wed, 6 Jan 2010 04:50:56 +0000 (+0000) Subject: Revert my available_externally vtables experiment. It's breaking the LLVM-with-Clang... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1a78afbde2257d01bd38a36e094d3e3231a9b412;p=clang Revert my available_externally vtables experiment. It's breaking the LLVM-with-Clang build with linker errors that I have yet to investigate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92822 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp index d89c6692f6..2cb877bf4d 100644 --- a/lib/CodeGen/CGVtable.cpp +++ b/lib/CodeGen/CGVtable.cpp @@ -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; } } diff --git a/test/CodeGenCXX/vtable-linkage.cpp b/test/CodeGenCXX/vtable-linkage.cpp index 5738007041..eaefdfa68d 100644 --- a/test/CodeGenCXX/vtable-linkage.cpp +++ b/test/CodeGenCXX/vtable-linkage.cpp @@ -125,7 +125,7 @@ void use_F(F &fc) { // F 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 is an explicit template instantiation declaration. It has a // key function that is not instantiation, so we should only reference