1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/test/DebugInfo/SystemZ/eh_frame_personality.ll
David Majnemer c8b1f095a3 Move the personality function from LandingPadInst to Function
The personality routine currently lives in the LandingPadInst.

This isn't desirable because:
- All LandingPadInsts in the same function must have the same
  personality routine.  This means that each LandingPadInst beyond the
  first has an operand which produces no additional information.

- There is ongoing work to introduce EH IR constructs other than
  LandingPadInst.  Moving the personality routine off of any one
  particular Instruction and onto the parent function seems a lot better
  than have N different places a personality function can sneak onto an
  exceptional function.

Differential Revision: http://reviews.llvm.org/D10429

llvm-svn: 239940
2015-06-17 20:52:32 +00:00

46 lines
1.7 KiB
LLVM

; RUN: llc < %s -verify-machineinstrs -mtriple=s390x-linux-gnu | FileCheck -check-prefix=CHECK-FUNC %s
; RUN: llc < %s -verify-machineinstrs -mtriple=s390x-linux-gnu | FileCheck -check-prefix=CHECK-ET %s
; RUN: llc < %s -verify-machineinstrs -mtriple=s390x-linux-gnu -relocation-model=pic | FileCheck -check-prefix=CHECK-REF %s
declare i32 @__gxx_personality_v0(...)
declare void @bar()
define i64 @foo(i64 %lhs, i64 %rhs) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
invoke void @bar() to label %end unwind label %clean
end:
ret i64 0
clean:
%tst = landingpad { i8*, i32 } cleanup
ret i64 42
}
; CHECK-FUNC: foo:
; CHECK-FUNC: .cfi_startproc
; CHECK-FUNC: .cfi_personality 0, __gxx_personality_v0
; CHECK-FUNC: .cfi_lsda 0, .Lexception0
; CHECK-FUNC: stmg %r14, %r15, 112(%r15)
; CHECK-FUNC: .cfi_offset %r14, -48
; CHECK-FUNC: .cfi_offset %r15, -40
; CHECK-FUNC: aghi %r15, -160
; CHECK-FUNC: .cfi_def_cfa_offset 320
; ...main function...
; CHECK-FUNC: .cfi_endproc
;
; CHECK-ET: .section .gcc_except_table,"a",@progbits
; CHECK-ET-NEXT: .align 4
; CHECK-ET-NEXT: GCC_except_table0:
; CHECK-ET-NEXT: .Lexception0:
;
; CHECK-REF: .cfi_personality 155, DW.ref.__gxx_personality_v0
; CHECK-REF: .cfi_lsda 27, .Lexception0
; CHECK-REF: .hidden DW.ref.__gxx_personality_v0
; CHECK-REF: .weak DW.ref.__gxx_personality_v0
; CHECK-REF: .section .data.DW.ref.__gxx_personality_v0,"aGw",@progbits,DW.ref.__gxx_personality_v0,comdat
; CHECK-REF-NEXT: .align 8
; CHECK-REF-NEXT: .type DW.ref.__gxx_personality_v0,@object
; CHECK-REF-NEXT: .size DW.ref.__gxx_personality_v0, 8
; CHECK-REF-NEXT: DW.ref.__gxx_personality_v0:
; CHECK-REF-NEXT: .quad __gxx_personality_v0