diff options
author | Anders Carlsson <andersca@mac.com> | 2009-12-04 18:36:22 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-12-04 18:36:22 +0000 |
commit | bad80eb7927902cd0a3d0f96ad22c4b7093f472b (patch) | |
tree | 06abf0a63b96f6c59a9b4e8550db2a7776d73c9d /clang/lib/CodeGen/CGVtable.cpp | |
parent | a6bd3f5f5eb1cf79786d75854ad0114b6f42772e (diff) | |
download | bcm5719-llvm-bad80eb7927902cd0a3d0f96ad22c4b7093f472b.tar.gz bcm5719-llvm-bad80eb7927902cd0a3d0f96ad22c4b7093f472b.zip |
Rename 'Class' to 'MostDerivedClass'
llvm-svn: 90573
Diffstat (limited to 'clang/lib/CodeGen/CGVtable.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGVtable.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/CGVtable.cpp b/clang/lib/CodeGen/CGVtable.cpp index 6518f52e0c4..5cd0d329ab3 100644 --- a/clang/lib/CodeGen/CGVtable.cpp +++ b/clang/lib/CodeGen/CGVtable.cpp @@ -33,8 +33,11 @@ private: VtableVectorTy Vtable; llvm::Type *Ptr8Ty; - /// Class - The most derived class that this vtable is being built for. - const CXXRecordDecl *Class; + + /// MostDerivedClass - The most derived class that this vtable is being + /// built for. + const CXXRecordDecl *MostDerivedClass; + /// LayoutClass - The most derived class used for virtual base layout /// information. const CXXRecordDecl *LayoutClass; @@ -174,12 +177,13 @@ private: } public: - VtableBuilder(const CXXRecordDecl *c, + VtableBuilder(const CXXRecordDecl *MostDerivedClass, const CXXRecordDecl *l, uint64_t lo, CodeGenModule &cgm) - : Class(c), LayoutClass(l), LayoutOffset(lo), + : MostDerivedClass(MostDerivedClass), LayoutClass(l), LayoutOffset(lo), BLayout(cgm.getContext().getASTRecordLayout(l)), - rtti(cgm.GenerateRTTIRef(c)), VMContext(cgm.getModule().getContext()), - CGM(cgm), PureVirtualFn(0),subAddressPoints(AllocAddressPoint(cgm, l, c)), + rtti(cgm.GenerateRTTIRef(MostDerivedClass)), + VMContext(cgm.getModule().getContext()),CGM(cgm), PureVirtualFn(0), + subAddressPoints(AllocAddressPoint(cgm, l, MostDerivedClass)), Extern(!l->isInAnonymousNamespace()), LLVMPointerWidth(cgm.getContext().Target.getPointerWidth(0)) { Ptr8Ty = llvm::PointerType::get(llvm::Type::getInt8Ty(VMContext), 0); @@ -284,7 +288,7 @@ public: qB = qB->getPointeeType(); CXXRecordDecl *D = cast<CXXRecordDecl>(qD->getAs<RecordType>()->getDecl()); CXXRecordDecl *B = cast<CXXRecordDecl>(qB->getAs<RecordType>()->getDecl()); - if (D != Class) + if (D != MostDerivedClass) return CGM.getVtableInfo().getVirtualBaseOffsetIndex(D, B); llvm::DenseMap<const CXXRecordDecl *, Index_t>::iterator i; i = VBIndex.find(B); @@ -582,7 +586,8 @@ public: // Construction vtable don't need parts that have no virtual bases and // aren't morally virtual. - if ((LayoutClass != Class) && RD->getNumVBases() == 0 && !MorallyVirtual) + if ((LayoutClass != MostDerivedClass) && + RD->getNumVBases() == 0 && !MorallyVirtual) return 0; const ASTRecordLayout &Layout = CGM.getContext().getASTRecordLayout(RD); |