summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/exception-label.ll
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-03-17 12:54:04 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-03-17 12:54:04 +0000
commitba41539548edc7747f09c66d5c337c4b1eb3750e (patch)
tree23d9574063f6e2b190629c6fda3c1fbcb0b95895 /llvm/test/CodeGen/X86/exception-label.ll
parent914b947e9bef4b6565e27930e903d2ed60981559 (diff)
downloadbcm5719-llvm-ba41539548edc7747f09c66d5c337c4b1eb3750e.tar.gz
bcm5719-llvm-ba41539548edc7747f09c66d5c337c4b1eb3750e.zip
Replace a use of GetTempSymbol with createTempSymbol.
This is cleaner and avoids a crash in a corner case. llvm-svn: 232471
Diffstat (limited to 'llvm/test/CodeGen/X86/exception-label.ll')
-rw-r--r--llvm/test/CodeGen/X86/exception-label.ll23
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/exception-label.ll b/llvm/test/CodeGen/X86/exception-label.ll
new file mode 100644
index 00000000000..cafa1e630b9
--- /dev/null
+++ b/llvm/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
+}
OpenPOWER on IntegriCloud