Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OpenCL] Do not include default header for preprocessor output as input
When clang driver is used with -save-temps to compile OpenCL program, clang driver first launches clang -cc1 -E to generate preprocessor expansion output, then launches clang -cc1 with the generated preprocessor expansion output as input to generate LLVM IR. Currently clang by default passes "-finclude-default-header" "-fdeclare-opencl-builtins" in both steps, which causes default header included again in the second step, which causes error. This patch let clang not to include default header when input type is preprocessor expansion output, which fixes the issue. Reviewed by: Anastasia Stulova Differential Revision: https://reviews.llvm.org/D104800
- Loading branch information