llvm-project/clang/lib/Driver
Yaxun (Sam) Liu 3193133add [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
2021-06-25 10:01:51 -04:00
..
ToolChains [OpenCL] Do not include default header for preprocessor output as input 2021-06-25 10:01:51 -04:00
Action.cpp [CUDA][HIP] Add -fuse-cuid 2021-02-08 22:26:12 -05:00
CMakeLists.txt [cfe][driver][M68k](8/8) Clang driver support 2021-03-08 12:30:57 -08:00
Compilation.cpp [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
DarwinSDKInfo.cpp
Distro.cpp Add support of the next Ubuntu (Ubuntu 21.10 - Impish Idri) 2021-04-22 20:38:28 +02:00
Driver.cpp [OptTable] Rename PrintHelp to printHelp 2021-06-24 14:47:03 -07:00
DriverOptions.cpp [Driver] Use shared singleton instance of DriverOptTable 2019-09-04 14:26:28 +00:00
InputInfo.h
Job.cpp [clang-cl] Remove the /fallback option 2021-02-04 10:33:16 +01:00
Multilib.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
OptionUtils.cpp [NFC] Move OptionUtils from Basic to Driver 2019-12-23 08:11:23 -05:00
Phases.cpp [clang][ifs] Clang Interface Stubs ToolChain plumbing. 2019-10-08 15:23:14 +00:00
SanitizerArgs.cpp [clang-cl][sanitizer] Add -fsanitize-address-use-after-return to clang. 2021-06-11 12:07:35 -07:00
Tool.cpp Clang Driver: refactor support for writing response files to be 2020-06-29 18:27:02 -04:00
ToolChain.cpp [AIX] Add -lc++abi and -lunwind for linking 2021-05-27 15:48:53 +00:00
Types.cpp [OpenCL] Added distinct file extension for C++ for OpenCL. 2021-03-24 13:07:04 +00:00
XRayArgs.cpp [xray] Function coverage groups 2020-09-24 22:09:53 -04:00