brintos

brintos / llvm-project-archived public Read only

0
0
Text · 800 B · a01999b Raw
17 lines · cpp
1// RUN: %clang_cc1 -x c++ -triple riscv32-unknown-elf -emit-llvm  -DCHECK_IR < %s | FileCheck %s2// RUN: %clang_cc1 -x c++ -triple riscv64-unknown-elf -emit-llvm  -DCHECK_IR < %s | FileCheck %s3// RUN: %clang_cc1 %s -triple riscv32-unknown-elf -verify -fsyntax-only4// RUN: %clang_cc1 %s -triple riscv64-unknown-elf -verify -fsyntax-only5 6#if defined(CHECK_IR)7// CHECK-LABEL: @_Z11foo_defaultv() #08// CHECK: ret void9[[gnu::interrupt]] void foo_default() {}10// CHECK: attributes #011// CHECK: "interrupt"="machine"12#else13[[gnu::interrupt]] [[gnu::interrupt]] void foo1() {} // expected-warning {{repeated RISC-V 'interrupt' attribute}} \14                                                     // expected-note {{repeated RISC-V 'interrupt' attribute is here}}15[[gnu::interrupt]] void foo2() {}16#endif17