The LLVM argument type for any of the OpenCL "Other Built-in Data Types" (such as image types) has changed since the transition to opaque pointers. This only affects the OpenCL target env modes of llvm-spirv.
For example, for the following OpenCL C kernel:
kernel void foo(image2d_t img, global int *out) {
*out = get_image_channel_data_type(img);
}
clang -target spir currently generates:
call spir_func i32 @_Z27get_image_channel_data_type14ocl_image2d_ro(target("spirv.Image", void, 1, 0, 0, 0, 0, 0, 0) %img)
Generating SPIR-V from the above kernel using clang -c --target=spirv64 and taking the SPIR-V through llvm-spirv -r gives:
call spir_func i32 @_Z27get_image_channel_data_type14ocl_image2d_ro(ptr addrspace(1) %img)
That is, the mangled function name remains the same, but the image argument has become a plain pointer instead of a TargetExtType.
My proposal would be to align to clang as closely as possible, so for this case we'd ideally generate TargetExtTypes instead of pointers.