diff options
author | John McCall <rjmccall@apple.com> | 2011-07-12 20:27:29 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-07-12 20:27:29 +0000 |
commit | 30317fda63655fe3e2bac2b1d8ff5de3d5f0f9a3 (patch) | |
tree | fe10b206328556a3b69fe30046c3cab8dd824ca4 /clang/lib/CodeGen/CGClass.cpp | |
parent | 77b0e7f2969ab69d72fe3908acfec27cdb9d65e5 (diff) | |
download | bcm5719-llvm-30317fda63655fe3e2bac2b1d8ff5de3d5f0f9a3.tar.gz bcm5719-llvm-30317fda63655fe3e2bac2b1d8ff5de3d5f0f9a3.zip |
Generalize Cleanup::Emit's "isForEH" parameter into a set
of flags. No functionality change.
llvm-svn: 134997
Diffstat (limited to 'clang/lib/CodeGen/CGClass.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGClass.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp index e0b2b9f81e6..e7c8cad75fb 100644 --- a/clang/lib/CodeGen/CGClass.cpp +++ b/clang/lib/CodeGen/CGClass.cpp @@ -329,7 +329,7 @@ namespace { CallBaseDtor(const CXXRecordDecl *Base, bool BaseIsVirtual) : BaseClass(Base), BaseIsVirtual(BaseIsVirtual) {} - void Emit(CodeGenFunction &CGF, bool IsForEH) { + void Emit(CodeGenFunction &CGF, Flags flags) { const CXXRecordDecl *DerivedClass = cast<CXXMethodDecl>(CGF.CurCodeDecl)->getParent(); @@ -511,7 +511,7 @@ namespace { CallMemberDtor(FieldDecl *Field, CXXDestructorDecl *Dtor) : Field(Field), Dtor(Dtor) {} - void Emit(CodeGenFunction &CGF, bool IsForEH) { + void Emit(CodeGenFunction &CGF, Flags flags) { // FIXME: Is this OK for C++0x delegating constructors? llvm::Value *ThisPtr = CGF.LoadCXXThis(); LValue LHS = CGF.EmitLValueForField(ThisPtr, Field, 0); @@ -921,7 +921,7 @@ namespace { struct CallDtorDelete : EHScopeStack::Cleanup { CallDtorDelete() {} - void Emit(CodeGenFunction &CGF, bool IsForEH) { + void Emit(CodeGenFunction &CGF, Flags flags) { const CXXDestructorDecl *Dtor = cast<CXXDestructorDecl>(CGF.CurCodeDecl); const CXXRecordDecl *ClassDecl = Dtor->getParent(); CGF.EmitDeleteCall(Dtor->getOperatorDelete(), CGF.LoadCXXThis(), @@ -940,14 +940,14 @@ namespace { : field(field), destroyer(*destroyer), useEHCleanupForArray(useEHCleanupForArray) {} - void Emit(CodeGenFunction &CGF, bool isForEH) { + void Emit(CodeGenFunction &CGF, Flags flags) { // Find the address of the field. llvm::Value *thisValue = CGF.LoadCXXThis(); LValue LV = CGF.EmitLValueForField(thisValue, field, /*CVRQualifiers=*/0); assert(LV.isSimple()); CGF.emitDestroy(LV.getAddress(), field->getType(), destroyer, - !isForEH && useEHCleanupForArray); + flags.isForNormalCleanup() && useEHCleanupForArray); } }; } @@ -1356,7 +1356,7 @@ namespace { CXXDtorType Type) : Dtor(D), Addr(Addr), Type(Type) {} - void Emit(CodeGenFunction &CGF, bool IsForEH) { + void Emit(CodeGenFunction &CGF, Flags flags) { CGF.EmitCXXDestructorCall(Dtor, Type, /*ForVirtualBase=*/false, Addr); } @@ -1411,7 +1411,7 @@ namespace { CallLocalDtor(const CXXDestructorDecl *D, llvm::Value *Addr) : Dtor(D), Addr(Addr) {} - void Emit(CodeGenFunction &CGF, bool IsForEH) { + void Emit(CodeGenFunction &CGF, Flags flags) { CGF.EmitCXXDestructorCall(Dtor, Dtor_Complete, /*ForVirtualBase=*/false, Addr); } |