summaryrefslogtreecommitdiff
path: root/test/CodeGen/WinEH
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2015-09-16 17:19:44 +0000
committerReid Kleckner <rnk@google.com>2015-09-16 17:19:44 +0000
commit1b86a3446fe136cc5e76f087f19c513971c12b83 (patch)
treeb5c69f6e2bf6d21a5bf63a64e95ed3345b956e6d /test/CodeGen/WinEH
parent617bb476352a6878b28b714834221d71051ec281 (diff)
[WinEH] Skip state numbering when no EH pads are present
Otherwise we'd try to emit the thunk that passes the LSDA to __CxxFrameHandler3. We don't emit the LSDA if there were no landingpads, so we'd end up with an assembler error when trying to write the COFF object. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247820 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/WinEH')
-rw-r--r--test/CodeGen/WinEH/wineh-statenumbering.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/WinEH/wineh-statenumbering.ll b/test/CodeGen/WinEH/wineh-statenumbering.ll
index fcbb8bd2fc3..b54843635ab 100644
--- a/test/CodeGen/WinEH/wineh-statenumbering.ll
+++ b/test/CodeGen/WinEH/wineh-statenumbering.ll
@@ -82,6 +82,14 @@ unreachable.for.entry: ; preds = %entry
unreachable
}
+define i32 @nopads() #0 personality i32 (...)* @__CxxFrameHandler3 {
+ ret i32 0
+}
+
+; CHECK-LABEL: define i32 @nopads()
+; CHECK-NEXT: ret i32 0
+; CHECK-NOT: __ehhandler$nopads
+
declare void @g(i32) #0
declare x86_stdcallcc void @_CxxThrowException(i8*, %eh.ThrowInfo*)