Add option to emit @llvm.trap as a function call instead of a trap instruction. rdar://9249183.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129107 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2011-04-07 20:31:12 +00:00
parent ce8463f1fb
commit 274d8d4eba
2 changed files with 31 additions and 4 deletions

View File

@@ -1,10 +1,15 @@
; RUN: llc < %s -march=arm | FileCheck %s
; RUN: llc < %s -mtriple=arm-apple-darwin | FileCheck %s -check-prefix=INSTR
; RUN: llc < %s -mtriple=arm-apple-darwin -arm-trap-func=_trap | FileCheck %s -check-prefix=FUNC
; rdar://7961298
; rdar://9249183
define void @t() nounwind {
entry:
; CHECK: t:
; CHECK: trap
; INSTR: t:
; INSTR: trap
; FUNC: t:
; FUNC: bl __trap
call void @llvm.trap()
unreachable
}