[cfe-commits] r79422 - /cfe/trunk/lib/CodeGen/CGCXX.cpp
Mike Stump
mrs at apple.com
Wed Aug 19 07:06:50 PDT 2009
Author: mrs
Date: Wed Aug 19 09:06:50 2009
New Revision: 79422
URL: http://llvm.org/viewvc/llvm-project?rev=79422&view=rev
Log:
We don't want to confuse this layout with the BLayout from the builder.
Modified:
cfe/trunk/lib/CodeGen/CGCXX.cpp
Modified: cfe/trunk/lib/CodeGen/CGCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCXX.cpp?rev=79422&r1=79421&r2=79422&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCXX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCXX.cpp Wed Aug 19 09:06:50 2009
@@ -853,20 +853,20 @@
void GenerateVBaseOffsets(std::vector<llvm::Constant *> &offsets,
const CXXRecordDecl *RD,
llvm::SmallSet<const CXXRecordDecl *, 32> &SeenVBase,
- uint64_t Offset, const ASTRecordLayout &BLayout) {
+ uint64_t Offset, const ASTRecordLayout &Layout) {
for (CXXRecordDecl::base_class_const_iterator i =RD->bases_begin(),
e = RD->bases_end(); i != e; ++i) {
const CXXRecordDecl *Base =
cast<CXXRecordDecl>(i->getType()->getAs<RecordType>()->getDecl());
if (i->isVirtual() && !SeenVBase.count(Base)) {
SeenVBase.insert(Base);
- int64_t BaseOffset = Offset/8 + BLayout.getVBaseClassOffset(Base) / 8;
+ int64_t BaseOffset = Offset/8 + Layout.getVBaseClassOffset(Base) / 8;
llvm::Constant *m;
m = llvm::ConstantInt::get(llvm::Type::getInt64Ty(VMContext), BaseOffset);
m = llvm::ConstantExpr::getIntToPtr(m, Ptr8Ty);
offsets.push_back(m);
}
- GenerateVBaseOffsets(offsets, Base, SeenVBase, Offset, BLayout);
+ GenerateVBaseOffsets(offsets, Base, SeenVBase, Offset, Layout);
}
}
};
More information about the cfe-commits
mailing list