annotate clang/test/Sema/riscv-interrupt-attr.cpp @ 266:00f31e85ec16 default tip

Added tag current for changeset 31d058e83c98
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 14 Oct 2023 10:13:55 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -x c++ -triple riscv32-unknown-elf -emit-llvm -DCHECK_IR < %s | FileCheck %s
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 -x c++ -triple riscv64-unknown-elf -emit-llvm -DCHECK_IR < %s | FileCheck %s
anatofuz
parents:
diff changeset
3 // RUN: %clang_cc1 %s -triple riscv32-unknown-elf -verify -fsyntax-only
anatofuz
parents:
diff changeset
4 // RUN: %clang_cc1 %s -triple riscv64-unknown-elf -verify -fsyntax-only
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 #if defined(CHECK_IR)
anatofuz
parents:
diff changeset
7 // CHECK-LABEL: @_Z11foo_defaultv() #0
anatofuz
parents:
diff changeset
8 // CHECK: ret void
anatofuz
parents:
diff changeset
9 [[gnu::interrupt]] void foo_default() {}
anatofuz
parents:
diff changeset
10 // CHECK: attributes #0
anatofuz
parents:
diff changeset
11 // CHECK: "interrupt"="machine"
anatofuz
parents:
diff changeset
12 #else
anatofuz
parents:
diff changeset
13 [[gnu::interrupt]] [[gnu::interrupt]] void foo1() {} // expected-warning {{repeated RISC-V 'interrupt' attribute}} \
anatofuz
parents:
diff changeset
14 // expected-note {{repeated RISC-V 'interrupt' attribute is here}}
anatofuz
parents:
diff changeset
15 [[gnu::interrupt]] void foo2() {}
anatofuz
parents:
diff changeset
16 #endif