1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/test/CodeGen/AArch64/ubsantrap.ll
Tim Northover 0fd5aa6df8 UBSAN: emit distinctive traps
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.
2020-12-08 10:28:26 +00:00

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)