1 ; RUN: llc -o - %s -mtriple=x86_64-windows-msvc | FileCheck %s --check-prefixes=CHECK,TRAP_AFTER_NORETURN
2 ; RUN: llc -o - %s -mtriple=x86_64-apple-darwin | FileCheck %s --check-prefixes=CHECK,NO_TRAP_AFTER_NORETURN
4 ; CHECK-LABEL: call_exit:
5 ; CHECK: callq {{_?}}exit
6 ; TRAP_AFTER_NORETURN: ud2
7 ; NO_TRAP_AFTER_NORETURN-NOT: ud2
8 define i32 @call_exit() noreturn nounwind {
9 tail call void @exit(i32 0)
15 ; TRAP_AFTER_NORETURN: ud2
16 ; NO_TRAP_AFTER_NORETURN-NOT: ud2
17 define i32 @trap() noreturn nounwind {
18 tail call void @llvm.trap()
22 ; CHECK-LABEL: unreachable:
24 define i32 @unreachable() noreturn nounwind {
28 declare void @llvm.trap() nounwind noreturn
29 declare void @exit(i32 %rc) nounwind noreturn