blob: f9985d4585128221c7ea3cc3d4b1e69f1bb7649e [file] [log] [blame]
Rafael Espindola5426a9e2011-05-01 04:49:54 +00001; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -disable-cfi | FileCheck --check-prefix=STATIC %s
2; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -disable-cfi -relocation-model=pic | FileCheck --check-prefix=PIC %s
3
4; STATIC: .ascii "zPLR"
5; STATIC: .byte 3
6; STATIC-NEXT: .long __gxx_personality_v0
7; STATIC-NEXT: .byte 3
8; STATIC-NEXT: .byte 3
9
10; PIC: .ascii "zPLR"
11; PIC: .byte 155
12; PIC-NEXT: .L
13; PIC-NEXT: .long DW.ref.__gxx_personality_v0-.L
14; PIC-NEXT: .byte 27
15; PIC-NEXT: .byte 27
16
17
18define void @bar() {
19entry:
20 %call = invoke i32 @foo()
21 to label %invoke.cont unwind label %lpad
22
23invoke.cont:
24 ret void
25
26lpad:
27 %exn = call i8* @llvm.eh.exception() nounwind
28 %eh.selector = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %exn, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i8* null) nounwind
29 ret void
30}
31
32declare i32 @foo()
33
34declare i8* @llvm.eh.exception() nounwind readonly
35
36declare i32 @__gxx_personality_v0(...)
37
38declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind