1// RUN: %clang_cc1 %s -ffake-address-space-map -faddress-space-map-mangling=yes -triple %itanium_abi_triple -emit-llvm -o - | FileCheck -check-prefix=ASMANG %s 2// RUN: %clang_cc1 %s -ffake-address-space-map -faddress-space-map-mangling=no -triple %itanium_abi_triple -emit-llvm -o - | FileCheck -check-prefix=NOASMANG %s 3 4// We check that the address spaces are mangled the same in both version of OpenCL 5// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=CL2.0 -emit-llvm -o - | FileCheck -check-prefix=OCL-20 %s 6// RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=CL1.2 -emit-llvm -o - | FileCheck -check-prefix=OCL-12 %s 7 8// We can't name this f as private is equivalent to default 9// no specifier given address space so we get multiple definition 10// warnings, but we do want it for comparison purposes. 11__attribute__((overloadable)) 12void ff(int *arg) { } 13// ASMANG: @_Z2ffPi 14// NOASMANG: @_Z2ffPi 15// OCL-20-DAG: @_Z2ffPU3AS4i 16// OCL-12-DAG: @_Z2ffPi 17 18__attribute__((overloadable)) 19void f(private int *arg) { } 20// ASMANG: @_Z1fPi 21// NOASMANG: @_Z1fPi 22// OCL-20-DAG: @_Z1fPi 23// OCL-12-DAG: @_Z1fPi 24 25__attribute__((overloadable)) 26void f(global int *arg) { } 27// ASMANG: @_Z1fPU3AS1i 28// NOASMANG: @_Z1fPU8CLglobali 29// OCL-20-DAG: @_Z1fPU3AS1i 30// OCL-12-DAG: @_Z1fPU3AS1i 31 32__attribute__((overloadable)) 33void f(local int *arg) { } 34// ASMANG: @_Z1fPU3AS3i 35// NOASMANG: @_Z1fPU7CLlocali 36// OCL-20-DAG: @_Z1fPU3AS3i 37// OCL-12-DAG: @_Z1fPU3AS3i 38 39__attribute__((overloadable)) 40void f(constant int *arg) { } 41// ASMANG: @_Z1fPU3AS2i 42// NOASMANG: @_Z1fPU10CLconstanti 43// OCL-20-DAG: @_Z1fPU3AS2i 44// OCL-12-DAG: @_Z1fPU3AS2i 45