summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2015-02-11 00:00:21 +0000
committerReid Kleckner <reid@kleckner.net>2015-02-11 00:00:21 +0000
commit4e8f3d056fc68714029c61df05645fbb88f5a391 (patch)
tree05ee44a0385fbda7556d984af1b11a1647ceae6b /lib/CodeGen/CGCall.cpp
parentaf10efb26dacb672b9a41af8d35b09e32872236e (diff)
Emit landing pads for SEH even if nounwind is present
Disabling exceptions applies nounwind to lots of functions. SEH catches asynch exceptions, so emit the landing pad anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@228769 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 95fad1a114..0574a1a34d 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -3304,7 +3304,8 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
llvm::BasicBlock *InvokeDest = nullptr;
if (!Attrs.hasAttribute(llvm::AttributeSet::FunctionIndex,
- llvm::Attribute::NoUnwind))
+ llvm::Attribute::NoUnwind) ||
+ currentFunctionUsesSEHTry())
InvokeDest = getInvokeDest();
llvm::CallSite CS;