[all-commits] [llvm/llvm-project] dc410f: [Clang][Driver] Fix `--save-temps` for OpenCL AoT ...
Shilei Tian via All-commits
all-commits at lists.llvm.org
Tue Jan 23 14:08:16 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: dc410f94f602390a65c832cf348b9ee6556b1809
https://github.com/llvm/llvm-project/commit/dc410f94f602390a65c832cf348b9ee6556b1809
Author: Shilei Tian <i at tianshilei.me>
Date: 2024-01-23 (Tue, 23 Jan 2024)
Changed paths:
M clang/include/clang/Driver/Types.def
M clang/lib/Driver/Types.cpp
A clang/test/Driver/opencl_aot_save_temps.cl
Log Message:
-----------
[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.
More information about the All-commits
mailing list