llvm-project
dc410f94 - [Clang][Driver] Fix `--save-temps` for OpenCL AoT compilation (#78333)

Commit
2 years ago
[Clang][Driver] Fix `--save-temps` for OpenCL AoT compilation (#78333) We can directly call `clang -c -x cl -target amdgcn -mcpu=gfx90a test.cl -o test.o` to compile an OpenCL kernel file. However, when `--save-temps` is enabled, it doesn't work because the preprocessed file (`.i` file) is taken as C source file when it is fed to the front end, thus causing compilation error because those OpenCL keywords can't be recognized. This patch fixes the issue.
Author
Parents
Loading