The global variable for the VTT might not have external linkage; allow

us to find local variables, too. Fixes the last remaining
Boost.Rational failure.

llvm-svn: 103203
This commit is contained in:
Douglas Gregor
2010-05-06 22:18:21 +00:00
parent 6eeb221f3b
commit ae498b3211
2 changed files with 10 additions and 2 deletions

View File

@@ -378,7 +378,7 @@ CodeGenVTables::GenerateVTT(llvm::GlobalVariable::LinkageTypes Linkage,
D1(printf("vtt %s\n", RD->getNameAsCString()));
llvm::GlobalVariable *GV = CGM.getModule().getGlobalVariable(Name);
llvm::GlobalVariable *GV = CGM.getModule().getGlobalVariable(Name, true);
if (GV == 0 || GV->isDeclaration()) {
const llvm::Type *Int8PtrTy =
llvm::Type::getInt8PtrTy(CGM.getLLVMContext());