summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGException.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp
index 61f538b0eec..b7953bcedc9 100644
--- a/clang/lib/CodeGen/CGException.cpp
+++ b/clang/lib/CodeGen/CGException.cpp
@@ -813,8 +813,8 @@ llvm::BasicBlock *CodeGenFunction::EmitLandingPad() {
bool hasFilter = false;
SmallVector<llvm::Value*, 4> filterTypes;
llvm::SmallPtrSet<llvm::Value*, 4> catchTypes;
- for (EHScopeStack::iterator I = EHStack.begin(), E = EHStack.end();
- I != E; ++I) {
+ for (EHScopeStack::iterator I = EHStack.begin(), E = EHStack.end(); I != E;
+ ++I) {
switch (I->getKind()) {
case EHScope::Cleanup:
@@ -1927,6 +1927,7 @@ void CodeGenFunction::ExitSEHTryStmt(const SEHTryStmt &S, SEHFinallyInfo &FI) {
assert(FI.ContBB && "did not emit normal cleanup");
// Emit the code into FinallyBB.
+ CGBuilderTy::InsertPoint SavedIP = Builder.saveIP();
Builder.SetInsertPoint(FI.FinallyBB);
EmitStmt(Finally->getBlock());
@@ -1949,7 +1950,7 @@ void CodeGenFunction::ExitSEHTryStmt(const SEHTryStmt &S, SEHFinallyInfo &FI) {
Builder.CreateBr(FI.ContBB);
}
- Builder.SetInsertPoint(FI.ContBB);
+ Builder.restoreIP(SavedIP);
return;
}
OpenPOWER on IntegriCloud