2015-11-03 16:17:25 +08:00
|
|
|
; RUN: llc < %s -mtriple=i686-pc-linux -filetype=obj | llvm-readobj -s -sr -sd | FileCheck %s -check-prefix=LINUX
|
2015-10-08 23:45:08 +08:00
|
|
|
; RUN: llc < %s -mtriple=i686-darwin-macosx10.7 -filetype=obj | llvm-readobj -sections | FileCheck -check-prefix=DARWIN %s
|
|
|
|
|
|
|
|
; On darwin, check that we manage to generate the compact unwind section
|
|
|
|
; DARWIN: Name: __compact_unwind
|
|
|
|
; DARWIN: Segment: __LD
|
2015-10-07 15:01:31 +08:00
|
|
|
|
2015-11-04 03:24:17 +08:00
|
|
|
; LINUX: Name: .eh_frame
|
2015-11-03 16:17:25 +08:00
|
|
|
; LINUX-NEXT: Type: SHT_PROGBITS (0x1)
|
|
|
|
; LINUX-NEXT: Flags [ (0x2)
|
|
|
|
; LINUX-NEXT: SHF_ALLOC (0x2)
|
|
|
|
; LINUX-NEXT: ]
|
|
|
|
; LINUX-NEXT: Address: 0x0
|
2018-02-10 01:13:37 +08:00
|
|
|
; LINUX-NEXT: Offset: 0x5C
|
2018-04-24 18:32:08 +08:00
|
|
|
; LINUX-NEXT: Size: 72
|
2015-11-03 16:17:25 +08:00
|
|
|
; LINUX-NEXT: Link: 0
|
|
|
|
; LINUX-NEXT: Info: 0
|
|
|
|
; LINUX-NEXT: AddressAlignment: 4
|
|
|
|
; LINUX-NEXT: EntrySize: 0
|
|
|
|
; LINUX-NEXT: Relocations [
|
|
|
|
; LINUX-NEXT: ]
|
|
|
|
; LINUX-NEXT: SectionData (
|
|
|
|
; LINUX-NEXT: 0000: 1C000000 00000000 017A504C 5200017C |.........zPLR..||
|
|
|
|
; LINUX-NEXT: 0010: 08070000 00000000 1B0C0404 88010000 |................|
|
2018-04-24 18:32:08 +08:00
|
|
|
; LINUX-NEXT: 0020: 24000000 24000000 00000000 1D000000 |$...$...........|
|
2015-11-03 16:17:25 +08:00
|
|
|
; LINUX-NEXT: 0030: 04000000 00410E08 8502420D 05432E10 |.....A....B..C..|
|
2018-04-24 18:32:08 +08:00
|
|
|
; LINUX-NEXT: 0040: 540C0404 410C0508 |T...A...|
|
2015-11-03 16:17:25 +08:00
|
|
|
; LINUX-NEXT: )
|
2015-10-07 15:01:31 +08:00
|
|
|
|
|
|
|
declare i32 @__gxx_personality_v0(...)
|
|
|
|
declare void @good(i32 %a, i32 %b, i32 %c, i32 %d)
|
|
|
|
|
2015-11-03 16:17:25 +08:00
|
|
|
define void @test() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
|
2015-10-07 15:01:31 +08:00
|
|
|
entry:
|
|
|
|
invoke void @good(i32 1, i32 2, i32 3, i32 4)
|
|
|
|
to label %continue unwind label %cleanup
|
|
|
|
continue:
|
|
|
|
ret void
|
2018-04-24 18:32:08 +08:00
|
|
|
cleanup:
|
2015-10-07 15:01:31 +08:00
|
|
|
landingpad { i8*, i32 }
|
|
|
|
cleanup
|
|
|
|
ret void
|
|
|
|
}
|
2015-11-03 16:17:25 +08:00
|
|
|
|
|
|
|
attributes #0 = { optsize "no-frame-pointer-elim"="true" }
|