brintos

brintos / llvm-project-archived public Read only

0
0
Text · 875 B · 8d7a301 Raw
41 lines · plain
1; RUN: llc < %s -O1 -mtriple=x86_64-pc-win32 | FileCheck %s -check-prefix=ASM2; RUN: llc < %s -O1 -mtriple=x86_64-pc-win32 -filetype=obj -o %t3; RUN: llvm-readobj --unwind %t | FileCheck %s -check-prefix=READOBJ4 5declare void @g(i32)6 7define i32 @not_leaf(i32) uwtable {8entry:9  call void @g(i32 42)10  ret i32 4211 12; ASM-LABEL: not_leaf:13; ASM: .seh14 15; READOBJ: RuntimeFunction {16; READOBJ-NEXT: StartAddress: not_leaf17; READOBJ-NEXT: EndAddress: not_leaf18}19 20define void @leaf_func(i32) uwtable {21entry:22  tail call void @g(i32 42)23  ret void24 25; A Win64 "leaf" function gets no .seh directives in the asm.26; ASM-LABEL: leaf_func:27; ASM-NOT: .seh28 29; and no unwind info in the object file.30; READOBJ-NOT: leaf_func31}32 33define void @naked_func() naked {34  call void asm sideeffect "ret", ""()35  unreachable36}37; ASM-LABEL: naked_func:38; ASM-NOT: .seh_39; ASM: ret40; ASM-NOT: .seh_41