summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorKeno Fischer <kfischer@college.harvard.edu>2015-07-14 19:22:51 +0000
committerKeno Fischer <kfischer@college.harvard.edu>2015-07-14 19:22:51 +0000
commitaff703a2ca704a55eadf024497bc5914ed089372 (patch)
treec7b7ff39807894a23917ff6c8be033aa08742017 /llvm/test
parentfea7765219c18743800785d8c58290695f661594 (diff)
downloadbcm5719-llvm-aff703a2ca704a55eadf024497bc5914ed089372.tar.gz
bcm5719-llvm-aff703a2ca704a55eadf024497bc5914ed089372.zip
[CodeGen] Force emission of personality directive if explicitly specified
Summary: Before this change, personality directives were not emitted if there was no invoke left in the function (of course until recently this also meant that we couldn't know what the personality actually was). This patch forces personality directives to still be emitted, unless it is known to be a noop in the absence of invokes, or the user explicitly specified `nounwind` (and not `uwtable`) on the function. Reviewers: majnemer, rnk Subscribers: rnk, llvm-commits Differential Revision: http://reviews.llvm.org/D10884 llvm-svn: 242185
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/X86/eh-nolandingpads.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/eh-nolandingpads.ll b/llvm/test/CodeGen/X86/eh-nolandingpads.ll
new file mode 100644
index 00000000000..96295226621
--- /dev/null
+++ b/llvm/test/CodeGen/X86/eh-nolandingpads.ll
@@ -0,0 +1,12 @@
+; RUN: llc < %s -mtriple=x86_64-pc-linux | FileCheck %s
+; Test that we emit functions with explicitly specified personality,
+; even if no landing pads are left.
+
+declare i32 @__my_personality_v0(...)
+declare void @might_throw()
+
+define i32 @foo() personality i32 (...)* @__my_personality_v0 {
+; CHECK: .cfi_personality 3, __my_personality_v0
+ call void @might_throw()
+ ret i32 0
+}
OpenPOWER on IntegriCloud