2014-01-15 03:35:09 +08:00
|
|
|
// RUN: %clang_cc1 %s -ffake-address-space-map -faddress-space-map-mangling=no -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
|
2011-09-20 05:14:35 +08:00
|
|
|
|
2014-11-04 00:51:53 +08:00
|
|
|
void func(local int*);
|
|
|
|
|
2011-09-20 05:14:35 +08:00
|
|
|
__kernel void foo(void) {
|
2016-12-24 00:11:25 +08:00
|
|
|
// CHECK: @foo.i = internal addrspace(3) global i32 undef
|
2011-09-20 05:14:35 +08:00
|
|
|
__local int i;
|
2014-11-04 00:51:53 +08:00
|
|
|
func(&i);
|
2011-09-20 05:14:35 +08:00
|
|
|
}
|
2013-02-08 09:07:32 +08:00
|
|
|
|
2015-06-30 01:29:50 +08:00
|
|
|
// CHECK-LABEL: define {{.*}}void @_Z3barPU7CLlocali
|
2013-02-08 09:07:32 +08:00
|
|
|
__kernel void __attribute__((__overloadable__)) bar(local int *x) {
|
|
|
|
*x = 5;
|
|
|
|
}
|