diff options
author | Mike Stump <mrs@apple.com> | 2009-12-09 03:35:49 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-12-09 03:35:49 +0000 |
commit | aff69af918e840a5f239533dee4dbde51d9d5c2c (patch) | |
tree | b217f38a5920bc4aca32877ddc2482b7f3a3a1ec /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | daa3d6bb502a356780ab112623ff64ff1f501e6f (diff) | |
download | bcm5719-llvm-aff69af918e840a5f239533dee4dbde51d9d5c2c.tar.gz bcm5719-llvm-aff69af918e840a5f239533dee4dbde51d9d5c2c.zip |
Add cleanups for exceptional edges. WIP.
llvm-svn: 90940
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 4b32999020c..adfd75b42a7 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -34,6 +34,7 @@ CodeGenFunction::CodeGenFunction(CodeGenModule &cgm) ConditionalBranchLevel(0) { LLVMIntTy = ConvertType(getContext().IntTy); LLVMPointerWidth = Target.getPointerWidth(0); + Exceptions = getContext().getLangOptions().Exceptions; } ASTContext &CodeGenFunction::getContext() const { @@ -625,9 +626,10 @@ llvm::Value* CodeGenFunction::EmitVAListRef(const Expr* E) { void CodeGenFunction::PushCleanupBlock(llvm::BasicBlock *CleanupEntryBlock, llvm::BasicBlock *CleanupExitBlock, + llvm::BasicBlock *PreviousInvokeDest, bool EHOnly) { CleanupEntries.push_back(CleanupEntry(CleanupEntryBlock, CleanupExitBlock, - EHOnly)); + PreviousInvokeDest, EHOnly)); } void CodeGenFunction::EmitCleanupBlocks(size_t OldCleanupStackSize) { @@ -651,6 +653,8 @@ CodeGenFunction::CleanupBlockInfo CodeGenFunction::PopCleanupBlock() { bool EHOnly = CE.EHOnly; + setInvokeDest(CE.PreviousInvokeDest); + CleanupEntries.pop_back(); // Check if any branch fixups pointed to the scope we just popped. If so, |