// RUN: %clang_cc1 -triple riscv32-unknown-elf -emit-llvm -DCHECK_IR < %s| FileCheck %s
// RUN: %clang_cc1 -triple riscv64-unknown-elf -emit-llvm -DCHECK_IR < %s| FileCheck %s
// RUN: %clang_cc1 %s -triple riscv32-unknown-elf -verify -fsyntax-only
// RUN: %clang_cc1 %s -triple riscv64-unknown-elf -verify -fsyntax-only
// CHECK-LABEL: @foo_user() #0
// CHECK: ret void
void
// CHECK-LABEL: @foo_supervisor() #1
// CHECK: ret void
void
// CHECK-LABEL: @foo_machine() #2
// CHECK: ret void
void
// CHECK-LABEL: @foo_default() #2
// CHECK: ret void
void
// CHECK-LABEL: @foo_default2() #2
// CHECK: ret void
void
// CHECK: attributes #0
// CHECK: "interrupt"="user"
// CHECK: attributes #1
// CHECK: "interrupt"="supervisor"
// CHECK: attributes #2
// CHECK: "interrupt"="machine"
;
struct a test ; // expected-warning {{'interrupt' attribute only applies to functions}}
void // expected-warning {{'interrupt' attribute argument not supported: USER}}
void // expected-error {{'interrupt' attribute takes no more than 1 argument}}
int // expected-warning {{RISC-V 'interrupt' attribute only applies to functions that have a 'void' return type}}
void ;
void
void // expected-warning {{RISC-V 'interrupt' attribute only applies to functions that have no parameters}}
void // expected-warning {{repeated RISC-V 'interrupt' attribute}} \
// expected-note {{repeated RISC-V 'interrupt' attribute is here}}
void // expected-warning {{repeated RISC-V 'interrupt' attribute}} \
// expected-note {{repeated RISC-V 'interrupt' attribute is here}}
void // expected-warning {{'interrupt' attribute argument not supported}}
void ;
void ;
void ;
void
void
void
void
void