Index: lib/AST/ItaniumMangle.cpp =================================================================== --- lib/AST/ItaniumMangle.cpp +++ lib/AST/ItaniumMangle.cpp @@ -1796,6 +1796,7 @@ case LangAS::opencl_global: ASString = "CLglobal"; break; case LangAS::opencl_local: ASString = "CLlocal"; break; case LangAS::opencl_constant: ASString = "CLconstant"; break; + case LangAS::opencl_generic: ASString = "CLgeneric"; break; // ::= "CU" [ "device" | "constant" | "shared" ] case LangAS::cuda_device: ASString = "CUdevice"; break; case LangAS::cuda_constant: ASString = "CUconstant"; break; Index: test/CodeGenOpenCL/generic_type_cl20.cl =================================================================== --- test/CodeGenOpenCL/generic_type_cl20.cl +++ test/CodeGenOpenCL/generic_type_cl20.cl @@ -0,0 +1,7 @@ +// RUN: %clang -Xclang -ffake-address-space-map -emit-llvm -x cl -Xclang -cl-std=CL2.0 -D__OPENCL_C_VERSION__=200 -D__OPENCL_VERSION__=200 -Dcl_khr_byte_addressable_store -Dcl_khr_global_int32_base_atomics -Dcl_khr_global_int32_extended_atomics -Dcl_khr_local_int32_base_atomics -Dcl_khr_local_int32_extended_atomics -Dcl_khr_spir -Dcl_khr_int64 -Dcl_khr_fp64 -Dcl_khr_int64_base_atomics -Dcl_khr_int64_extended_atomics -c %s + +typedef int int4 __attribute((ext_vector_type(4))); + +void test(int4 x) // test parameter with generic address space +{ +}