1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
llvm-mirror/test/CodeGen/X86/eh-nolandingpads.ll
Keno Fischer 400c1358d0 [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
2015-07-14 19:22:51 +00:00

13 lines
387 B
LLVM

; 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
}