Skip to content

Commit 5b0148a

Browse files
committed
Add target-version-invalid
1 parent e761914 commit 5b0148a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// RUN: not %clang_cc1 -triple riscv64 -target-feature +i -emit-llvm -o - %s 2>&1 | FileCheck %s --check-prefix=CHECK-UNSUPPORT-OS
2+
3+
// CHECK-UNSUPPORT-OS: error: target_clones is currently only supported on Linux
4+
__attribute__((target_version("default"))) int foo(void) {
5+
return 2;
6+
}
7+
8+
__attribute__((target_version("arch=+c"))) int foo(void) {
9+
return 2;
10+
}
11+
12+
13+
int bar() { return foo(); }

0 commit comments

Comments
 (0)