summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGException.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGException.cpp')
-rw-r--r--clang/lib/CodeGen/CGException.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp
index 9df4f977318..b8ce205ff1b 100644
--- a/clang/lib/CodeGen/CGException.cpp
+++ b/clang/lib/CodeGen/CGException.cpp
@@ -21,6 +21,7 @@
#include "clang/AST/StmtObjC.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/Intrinsics.h"
+#include "llvm/Support/SaveAndRestore.h"
using namespace clang;
using namespace CodeGen;
@@ -1703,7 +1704,11 @@ void CodeGenFunction::EmitSEHTryStmt(const SEHTryStmt &S) {
SEHFinallyInfo FI;
EnterSEHTryStmt(S, FI);
- EmitStmt(S.getTryBlock());
+ {
+ // Disable inlining inside SEH __try scopes.
+ SaveAndRestore<bool> Saver(IsSEHTryScope, true);
+ EmitStmt(S.getTryBlock());
+ }
ExitSEHTryStmt(S, FI);
}
OpenPOWER on IntegriCloud