summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGClass.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-04-12 00:51:03 +0000
committerAnders Carlsson <andersca@mac.com>2010-04-12 00:51:03 +0000
commit1c0f8bb4ce83d225ec40666ce6bfcb844f8a2c12 (patch)
treeeb526c63366651862dde5552d25aa8faacee1d85 /clang/lib/CodeGen/CGClass.cpp
parentc0f1efaf8d50d235545ab2ce1a525cc3902212af (diff)
downloadbcm5719-llvm-1c0f8bb4ce83d225ec40666ce6bfcb844f8a2c12.tar.gz
bcm5719-llvm-1c0f8bb4ce83d225ec40666ce6bfcb844f8a2c12.zip
Have the CXXBaseOrMemberInitializer keep track of whether an initializer initializes a virtual base or not.
llvm-svn: 101004
Diffstat (limited to 'clang/lib/CodeGen/CGClass.cpp')
-rw-r--r--clang/lib/CodeGen/CGClass.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp
index 177e8623047..7ca8f29b7e9 100644
--- a/clang/lib/CodeGen/CGClass.cpp
+++ b/clang/lib/CodeGen/CGClass.cpp
@@ -782,15 +782,7 @@ static void EmitBaseInitializer(CodeGenFunction &CGF,
CXXRecordDecl *BaseClassDecl =
cast<CXXRecordDecl>(BaseType->getAs<RecordType>()->getDecl());
- // FIXME: This method of determining whether a base is virtual is ridiculous;
- // it should be part of BaseInit.
- bool isBaseVirtual = false;
- for (CXXRecordDecl::base_class_const_iterator I = ClassDecl->vbases_begin(),
- E = ClassDecl->vbases_end(); I != E; ++I)
- if (I->getType()->getAs<RecordType>()->getDecl() == BaseClassDecl) {
- isBaseVirtual = true;
- break;
- }
+ bool isBaseVirtual = BaseInit->isBaseVirtual();
// The base constructor doesn't construct virtual bases.
if (CtorType == Ctor_Base && isBaseVirtual)
@@ -976,8 +968,6 @@ void CodeGenFunction::EmitCtorPrologue(const CXXConstructorDecl *CD,
llvm::SmallVector<CXXBaseOrMemberInitializer *, 8> MemberInitializers;
- // FIXME: Add vbase initialization
-
for (CXXConstructorDecl::init_const_iterator B = CD->init_begin(),
E = CD->init_end();
B != E; ++B) {
OpenPOWER on IntegriCloud