This patch is to fix radar://8426430. It is about llvm support of __builtin_debugtrap()
[oota-llvm.git] / test / CodeGen / ARM / trap.ll
1 ; RUN: llc < %s -mtriple=arm-apple-darwin | FileCheck %s -check-prefix=INSTR
2 ; RUN: llc < %s -mtriple=arm-apple-darwin -trap-func=_trap | FileCheck %s -check-prefix=FUNC
3 ; rdar://7961298
4 ; rdar://9249183
5
6 define void @t() nounwind {
7 entry:
8 ; INSTR: t:
9 ; INSTR: trap
10
11 ; FUNC: t:
12 ; FUNC: bl __trap
13   call void @llvm.trap()
14   unreachable
15 }
16
17 define void @t2() nounwind {
18 entry:
19 ; INSTR: t2:
20 ; INSTR: trap
21
22 ; FUNC: t2:
23 ; FUNC: bl __trap
24   call void @llvm.debugtrap()
25   unreachable
26 }
27
28 declare void @llvm.trap() nounwind
29 declare void @llvm.debugtrap() nounwind