aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/exception-label.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/exception-label.ll')
-rw-r--r--test/CodeGen/X86/exception-label.ll23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CodeGen/X86/exception-label.ll b/test/CodeGen/X86/exception-label.ll
new file mode 100644
index 0000000..cafa1e6
--- /dev/null
+++ b/test/CodeGen/X86/exception-label.ll
@@ -0,0 +1,23 @@
+; RUN: llc < %s -mtriple=x86_64-pc-linux | FileCheck %s
+
+; Test that we can handle .Lexception0 being defined. We used to crash.
+
+; CHECK: .cfi_lsda 3, [[LABEL:.*]]
+; CHECK: [[LABEL]]:
+; CHECK-NEXT: .byte 255 # @LPStart Encoding = omit
+
+declare void @g()
+
+define void @f() {
+bb0:
+ call void asm ".Lexception0:", ""()
+ invoke void @g()
+ to label %bb2 unwind label %bb1
+bb1:
+ landingpad { i8*, i32 } personality i8* bitcast (void ()* @g to i8*)
+ catch i8* null
+ br label %bb2
+
+bb2:
+ ret void
+}