[clang] [Clang][RISCV] Allow three SiFive CLIC interrupt arguments (PR #216159)
Zeyi Xu via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 15 07:27:14 PDT 2026
================
@@ -16,6 +16,11 @@ void foo_nest_interrupt(void) {}
__attribute__((interrupt("qci-nest", "qci-nest")))
void foo_nest_nest_interrupt(void) {}
+// CHECK-LABEL: @foo_nest_nest_nest_interrupt() #0
+// CHECK: ret void
+__attribute__((interrupt("qci-nest", "qci-nest", "qci-nest")))
----------------
zeyi2 wrote:
I plan to add a new diagnostic for this:
```td
def err_riscv_attribute_interrupt_duplicate_type : Error<
"RISC-V 'interrupt' attribute type '%0' cannot be specified more than once">;
```
This allows the diagnostic to identify the duplicated kind and point to its second occurrence. Does this approach look reasonable, or reuse an existing one is better?
Also, would you prefer me to include it in this PR or submit it as a separate follow-up?
https://github.com/llvm/llvm-project/pull/216159
More information about the cfe-commits
mailing list