[cfe-commits] r81071 - /cfe/trunk/lib/CodeGen/CGCXX.cpp
Mike Stump
mrs at apple.com
Sat Sep 5 01:07:33 PDT 2009
Author: mrs
Date: Sat Sep 5 03:07:32 2009
New Revision: 81071
URL: http://llvm.org/viewvc/llvm-project?rev=81071&view=rev
Log:
Cleanups.
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=81071&r1=81070&r2=81071&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCXX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCXX.cpp Sat Sep 5 03:07:32 2009
@@ -1080,7 +1080,7 @@
int64_t GenerateVtableForBase(const CXXRecordDecl *RD, bool forPrimary,
bool Bottom, bool MorallyVirtual,
int64_t Offset, bool ForVirtualBase) {
- if (RD && !RD->isDynamicClass())
+ if (!RD->isDynamicClass())
return 0;
const ASTRecordLayout &Layout = CGM.getContext().getASTRecordLayout(RD);
@@ -1118,8 +1118,7 @@
MorallyVirtual, Offset, ForVirtualBase);
}
- void GenerateVtableForVBases(const CXXRecordDecl *RD,
- const CXXRecordDecl *Class) {
+ void GenerateVtableForVBases(const CXXRecordDecl *RD) {
for (CXXRecordDecl::base_class_const_iterator i = RD->bases_begin(),
e = RD->bases_end(); i != e; ++i) {
const CXXRecordDecl *Base =
@@ -1135,7 +1134,7 @@
InstallThunks(AP);
}
if (Base->getNumVBases())
- GenerateVtableForVBases(Base, Class);
+ GenerateVtableForVBases(Base);
}
}
};
@@ -1165,7 +1164,7 @@
std::vector<llvm::Constant *> methods;
VtableBuilder b(methods, RD, CGM);
b.GenerateVtableForBase(RD, true, true, false, 0, false);
- b.GenerateVtableForVBases(RD, RD);
+ b.GenerateVtableForVBases(RD);
register_index(RD, b.getIndex());
I = IndexFor.find(RD);
}
@@ -1195,7 +1194,7 @@
Offset = b.GenerateVtableForBase(RD, true, true, false, 0, false);
// then the vtables for all the virtual bases.
- b.GenerateVtableForVBases(RD, RD);
+ b.GenerateVtableForVBases(RD);
llvm::Constant *C;
llvm::ArrayType *type = llvm::ArrayType::get(Ptr8Ty, methods.size());
More information about the cfe-commits
mailing list