mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
0fd5aa6df8
Sometimes people get minimal crash reports after a UBSAN incident. This change tags each trap with an integer representing the kind of failure encountered, which can aid in tracking down the root cause of the problem.
19 lines
422 B
LLVM
19 lines
422 B
LLVM
; RUN: llc -mtriple=arm64-apple-ios %s -o - | FileCheck %s
|
|
|
|
define void @test_ubsantrap() {
|
|
; CHECK-LABEL: test_ubsantrap
|
|
; CHECK: brk #0x550c
|
|
call void @llvm.ubsantrap(i8 12)
|
|
ret void
|
|
}
|
|
|
|
define void @test_ubsantrap_function() {
|
|
; CHECK-LABEL: test_ubsantrap_function:
|
|
; CHECK: mov w0, #12
|
|
; CHECK: bl _wibble
|
|
call void @llvm.ubsantrap(i8 12) "trap-func-name"="wibble"
|
|
ret void
|
|
}
|
|
|
|
declare void @llvm.ubsantrap(i8)
|