Rafael Espindola | 5426a9e | 2011-05-01 04:49:54 +0000 | [diff] [blame] | 1 | ; 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 | |
| 18 | define void @bar() { |
| 19 | entry: |
| 20 | %call = invoke i32 @foo() |
| 21 | to label %invoke.cont unwind label %lpad |
| 22 | |
| 23 | invoke.cont: |
| 24 | ret void |
| 25 | |
| 26 | lpad: |
| 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 | |
| 32 | declare i32 @foo() |
| 33 | |
| 34 | declare i8* @llvm.eh.exception() nounwind readonly |
| 35 | |
| 36 | declare i32 @__gxx_personality_v0(...) |
| 37 | |
| 38 | declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind |