Slight tweak to vtable linkage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90832 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eli Friedman 2009-12-08 04:09:14 +00:00
Родитель 61eab88721
Коммит 0259ce2b4a
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -1462,7 +1462,7 @@ void CGVtableInfo::MaybeEmitVtable(GlobalDecl GD) {
llvm::GlobalVariable::LinkageTypes Linkage; llvm::GlobalVariable::LinkageTypes Linkage;
if (RD->isInAnonymousNamespace()) if (RD->isInAnonymousNamespace())
Linkage = llvm::GlobalVariable::InternalLinkage; Linkage = llvm::GlobalVariable::InternalLinkage;
else if (KeyFunction) else if (KeyFunction && !MD->isInlined())
Linkage = llvm::GlobalVariable::ExternalLinkage; Linkage = llvm::GlobalVariable::ExternalLinkage;
else else
Linkage = llvm::GlobalVariable::WeakODRLinkage; Linkage = llvm::GlobalVariable::WeakODRLinkage;

Просмотреть файл

@ -35,7 +35,7 @@ testg *testgvar = new testg;
// FIXME: The checks are extremely difficult to get right when the globals // FIXME: The checks are extremely difficult to get right when the globals
// aren't alphabetized // aren't alphabetized
// CHECK: @_ZTV5testa = constant [3 x i8*] [i8* null // CHECK: @_ZTV5testa = constant [3 x i8*] [i8* null
// CHECK: @_ZTV5testc = constant [3 x i8*] [i8* null // CHECK: @_ZTV5testc = weak_odr constant [3 x i8*] [i8* null
// CHECK: @_ZTVN12_GLOBAL__N_15testgE = internal constant [3 x i8*] [i8* null // CHECK: @_ZTVN12_GLOBAL__N_15testgE = internal constant [3 x i8*] [i8* null
// CHECK: @_ZTV5teste = weak_odr constant [3 x i8*] [i8* null // CHECK: @_ZTV5teste = weak_odr constant [3 x i8*] [i8* null
// CHECK: @_ZTV5testb = weak_odr constant [3 x i8*] [i8* null // CHECK: @_ZTV5testb = weak_odr constant [3 x i8*] [i8* null