address spaces which is both (1) a "semantic" concept and (2) possibly a hardware level restriction. It is desirable to be able to discard/merge the LLVM-level address spaces on arguments for which there is no difference to the current backend while keeping track of the semantic address spaces in a funciton prototype. To do this enable addition of the address space into the name-mangling process. Add some tests to document this behaviour against inadvertent changes. Patch by Michele Scandale! llvm-svn: 190684
13 lines
334 B
Common Lisp
13 lines
334 B
Common Lisp
// RUN: %clang_cc1 %s -ffake-address-space-map -faddress-space-map-mangling=no -emit-llvm -o - | FileCheck %s
|
|
|
|
__kernel void foo(void) {
|
|
// CHECK: @foo.i = internal addrspace(2)
|
|
__local int i;
|
|
++i;
|
|
}
|
|
|
|
// CHECK-LABEL: define void @_Z3barPU7CLlocali
|
|
__kernel void __attribute__((__overloadable__)) bar(local int *x) {
|
|
*x = 5;
|
|
}
|