Extend debug info handling by adding DWARF address space mapping for SPIR, with corresponding test case.
btw this variable is a duplicate of FileVar0 for your change. In clang parser:
The same applies to local variables of Type * and Type *private as they are equivalent on AST level too.
This is due to the address space inference rules if you are interested in more details: https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_C.html#addr-spaces-inference
Perhaps you could reduce the test case a bit by removing the duplicate testing?
Also I would suggest separating with empty lines every variable declaration with its corresponding CHECK line to improve the readability.
CHECK: <...> Type var1; CHECK: <...> Type var2;
In case this review feeds into changes made for other test files, it may be worth noting that the test in question uses OpenCL C 2.0 (-cl-std=CL2.0), and therefore the generic address space as the default in many contexts, rather than private. (This comment is made not for direct benefit for this review itself, but for the benefit of anyone who may be reading who is not already especially familiar with OpenCL address spaces.)
The duplicated testing has now been removed from the newly added test, though.