diff options
author | Reid Kleckner <reid@kleckner.net> | 2015-02-11 21:40:48 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2015-02-11 21:40:48 +0000 |
commit | a593000f0133bccfeabb5f89b8c9d9533d2106bd (patch) | |
tree | 9a0e4939e3655257631c64903b577682e3ed207c /clang/lib/CodeGen/CGException.cpp | |
parent | 59c8aa92b8933fdf1cfefdaadc877c7ad640d4cb (diff) | |
download | bcm5719-llvm-a593000f0133bccfeabb5f89b8c9d9533d2106bd.tar.gz bcm5719-llvm-a593000f0133bccfeabb5f89b8c9d9533d2106bd.zip |
Add the 'noinline' attribute to call sites within __try bodies
LLVM doesn't support non-call exceptions, so inlining makes it harder to
catch such asynchronous exceptions.
llvm-svn: 228876
Diffstat (limited to 'clang/lib/CodeGen/CGException.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGException.cpp | 7 |
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); } |