diff options
-rw-r--r-- | lib/CodeGen/CGVtable.cpp | 9 | ||||
-rw-r--r-- | test/CodeGenCXX/vtable-linkage.cpp | 2 |
2 files changed, 8 insertions, 3 deletions
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<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 |