[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / CodeGenSYCL / address-space-mangling.cpp
blob37df32493e3491eb15a213436bf0a9491f2c3902
1 // RUN: %clang_cc1 -triple spir64 -fsycl-is-device -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s --check-prefix=SPIR
2 // RUN: %clang_cc1 -triple x86_64 -fsycl-is-device -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s --check-prefix=X86
4 // REQUIRES: x86-registered-target
6 void foo(__attribute__((opencl_global)) int *);
7 void foo(__attribute__((opencl_local)) int *);
8 void foo(__attribute__((opencl_private)) int *);
9 void foo(int *);
11 // SPIR: declare spir_func void @_Z3fooPU3AS1i(i32 addrspace(1)* noundef) #1
12 // SPIR: declare spir_func void @_Z3fooPU3AS3i(i32 addrspace(3)* noundef) #1
13 // SPIR: declare spir_func void @_Z3fooPU3AS0i(i32* noundef) #1
14 // SPIR: declare spir_func void @_Z3fooPi(i32 addrspace(4)* noundef) #1
16 // X86: declare void @_Z3fooPU8SYglobali(i32* noundef) #1
17 // X86: declare void @_Z3fooPU7SYlocali(i32* noundef) #1
18 // X86: declare void @_Z3fooPU9SYprivatei(i32* noundef) #1
19 // X86: declare void @_Z3fooPi(i32* noundef) #1
21 void test() {
22 __attribute__((opencl_global)) int *glob;
23 __attribute__((opencl_local)) int *loc;
24 __attribute__((opencl_private)) int *priv;
25 int *def;
26 foo(glob);
27 foo(loc);
28 foo(priv);
29 foo(def);