aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGVtable.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-03-24 05:32:05 +0000
committerAnders Carlsson <andersca@mac.com>2010-03-24 05:32:05 +0000
commit5eea8768b7a659825a46d7e55730a75282231a6f (patch)
tree79ef04b571efdcf63c4445842fc17cd75a0900c3 /lib/CodeGen/CGVtable.cpp
parent1a37d0a8f0f7110046e499bbe1117fec91f31f7e (diff)
Use getNamedGlobal instead of getGlobalVariable. (Fixes self-host).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99385 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVtable.cpp')
-rw-r--r--lib/CodeGen/CGVtable.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp
index c9b099bcd9..3854c404c2 100644
--- a/lib/CodeGen/CGVtable.cpp
+++ b/lib/CodeGen/CGVtable.cpp
@@ -3918,7 +3918,7 @@ CodeGenVTables::GenerateClassData(llvm::GlobalVariable::LinkageTypes Linkage,
GenerateVTT(Linkage, /*GenerateDefinition=*/true, RD);
}
-llvm::Constant *CodeGenVTables::getAddrOfVTable(const CXXRecordDecl *RD) {
+llvm::Constant *CodeGenVTables::GetAddrOfVTable(const CXXRecordDecl *RD) {
llvm::SmallString<256> OutName;
CGM.getMangleContext().mangleCXXVtable(RD, OutName);
llvm::StringRef Name = OutName.str();
@@ -3926,7 +3926,7 @@ llvm::Constant *CodeGenVTables::getAddrOfVTable(const CXXRecordDecl *RD) {
const llvm::Type *Int8PtrTy = llvm::Type::getInt8PtrTy(CGM.getLLVMContext());
llvm::ArrayType *ArrayType = llvm::ArrayType::get(Int8PtrTy, 0);
- llvm::GlobalVariable *GV = CGM.getModule().getGlobalVariable(Name);
+ llvm::GlobalVariable *GV = CGM.getModule().getNamedGlobal(Name);
if (GV) {
if (!GV->isDeclaration() || GV->getType()->getElementType() == ArrayType)
return GV;