1*0a6a1f1dSLionel Sambuc// RUN: %clang_cc1 %s -ffake-address-space-map -faddress-space-map-mangling=no -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s 2*0a6a1f1dSLionel Sambuc 3*0a6a1f1dSLionel Sambucvoid func(local int*); 4f4a2713aSLionel Sambuc 5f4a2713aSLionel Sambuc__kernel void foo(void) { 6*0a6a1f1dSLionel Sambuc // CHECK: @foo.i = internal addrspace(2) global i32 undef 7f4a2713aSLionel Sambuc __local int i; 8*0a6a1f1dSLionel Sambuc func(&i); 9f4a2713aSLionel Sambuc} 10f4a2713aSLionel Sambuc 11f4a2713aSLionel Sambuc// CHECK-LABEL: define void @_Z3barPU7CLlocali 12f4a2713aSLionel Sambuc__kernel void __attribute__((__overloadable__)) bar(local int *x) { 13f4a2713aSLionel Sambuc *x = 5; 14f4a2713aSLionel Sambuc} 15