llvm-project/llvm/test/CodeGen/RISCV/interrupt-attr-args-error.ll
Sam Elliott f06b7f258e
[RISCV] Mark More Fatal Errors as Usage/Internal (#154876)
We have lots of uses of `report_fatal_error` in the backend, which will
result in a crash and a backtrace. This API has been replaced with
`reportFatalUsageError` and `reportFatalInternalError`, for which only
the latter emits a stack trace.

This tries to move the errors in RISCVISelLowering and RISCVRegisterInfo
to the new APIs, to prevent some stack traces where we specificially do
not support certain situations.

Updates #124132
2025-08-22 11:57:17 -07:00

12 lines
339 B
LLVM

; RUN: not llc -mtriple riscv32-unknown-elf -o - %s \
; RUN: 2>&1 | FileCheck %s
; RUN: not llc -mtriple riscv64-unknown-elf -o - %s \
; RUN: 2>&1 | FileCheck %s
; CHECK: LLVM ERROR: Functions with the interrupt attribute cannot have arguments!
define i32 @isr_user(i8 %n) #0 {
ret i32 0
}
attributes #0 = { "interrupt"="supervisor" }