[cfe-commits] r124095 - in /cfe/trunk/lib/CodeGen: CGRTTI.cpp CodeGenModule.h
Anders Carlsson
andersca at mac.com
Sun Jan 23 18:04:33 PST 2011
Author: andersca
Date: Sun Jan 23 20:04:33 2011
New Revision: 124095
URL: http://llvm.org/viewvc/llvm-project?rev=124095&view=rev
Log:
Change CodeGenModule::getVTableLinkage to be a non-static member function.
Modified:
cfe/trunk/lib/CodeGen/CGRTTI.cpp
cfe/trunk/lib/CodeGen/CodeGenModule.h
Modified: cfe/trunk/lib/CodeGen/CGRTTI.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGRTTI.cpp?rev=124095&r1=124094&r2=124095&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGRTTI.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGRTTI.cpp Sun Jan 23 20:04:33 2011
@@ -329,7 +329,8 @@
/// getTypeInfoLinkage - Return the linkage that the type info and type info
/// name constants should have for the given type.
-static llvm::GlobalVariable::LinkageTypes getTypeInfoLinkage(QualType Ty) {
+static llvm::GlobalVariable::LinkageTypes
+getTypeInfoLinkage(CodeGenModule &CGM, QualType Ty) {
// Itanium C++ ABI 2.9.5p7:
// In addition, it and all of the intermediate abi::__pointer_type_info
// structs in the chain down to the abi::__class_type_info for the
@@ -352,7 +353,7 @@
if (const RecordType *Record = dyn_cast<RecordType>(Ty)) {
const CXXRecordDecl *RD = cast<CXXRecordDecl>(Record->getDecl());
if (RD->isDynamicClass())
- return CodeGenModule::getVTableLinkage(RD);
+ return CGM.getVTableLinkage(RD);
}
return llvm::GlobalValue::LinkOnceODRLinkage;
@@ -530,7 +531,7 @@
if (IsStdLib)
Linkage = llvm::GlobalValue::ExternalLinkage;
else
- Linkage = getTypeInfoLinkage(Ty);
+ Linkage = getTypeInfoLinkage(CGM, Ty);
// Add the vtable pointer.
BuildVTablePointer(cast<Type>(Ty));
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.h?rev=124095&r1=124094&r2=124095&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.h (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.h Sun Jan 23 20:04:33 2011
@@ -496,8 +496,7 @@
/// getVTableLinkage - Return the appropriate linkage for the vtable, VTT,
/// and type information of the given class.
- static llvm::GlobalVariable::LinkageTypes
- getVTableLinkage(const CXXRecordDecl *RD);
+ llvm::GlobalVariable::LinkageTypes getVTableLinkage(const CXXRecordDecl *RD);
/// GetTargetTypeStoreSize - Return the store size, in character units, of
/// the given LLVM type.
More information about the cfe-commits
mailing list