if (!ClassDecl->isDynamicClass())
return;
- llvm::Constant *VTable = CGM.getVTables().getAddrOfVTable(ClassDecl);
+ llvm::Constant *VTable = CGM.getVTables().GetAddrOfVTable(ClassDecl);
const CodeGenVTables::AddrSubMap_t& AddressPoints =
CGM.getVTables().getAddressPoints(ClassDecl);
GenerateDefinition(GenerateDefinition) {
// First comes the primary virtual table pointer for the complete class...
- ClassVtbl = GenerateDefinition ? CGM.getVTables().getAddrOfVTable(Class) :0;
+ ClassVtbl = GenerateDefinition ? CGM.getVTables().GetAddrOfVTable(Class) :0;
llvm::Constant *Init = BuildVtablePtr(ClassVtbl, Class, Class, 0);
Inits.push_back(Init);
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();
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;
int64_t getVirtualBaseOffsetOffset(const CXXRecordDecl *RD,
const CXXRecordDecl *VBase);
- /// getAddrOfVTable - Get the address of the vtable for the given record decl.
- llvm::Constant *getAddrOfVTable(const CXXRecordDecl *RD);
+ /// GetAddrOfVTable - Get the address of the vtable for the given record decl.
+ llvm::Constant *GetAddrOfVTable(const CXXRecordDecl *RD);
/// CtorVtableInfo - Information about a constructor vtable.
struct CtorVtableInfo {