KhronosGroup / SPIRV-LLVM-Translator

A tool and a library for bi-directional translation between SPIR-V and LLVM IR
Other
473 stars 211 forks source link

Fix mangling issue #2471

Open asudarsa opened 5 months ago

asudarsa commented 5 months ago

In 80dfd864ae556369747074bbde8fc1d4c48547be, we turned on OCLToSPIRV and OCLTypeToSPIRV passes for OpenCL C++ and C++ for OpenCL source languages. In these passes, there are places where some names are mangled/unmangled. Existing code always passed IsCpp=false. With addition of C++ sources, we now need to store the Source language info and use it to figure out IsCpp.

Thanks

asudarsa commented 5 months ago

I was not able to come up with a test case that covered these changes. However, it seems like these hookups are required for robustness. Moving it out of draft for review.

Thanks