llvm-project/clang/lib/Driver
Reid Kleckner a643e6449b [clang-cl] Treat inputs as C++ with /E, like MSVC
midl invokes the compiler on .idl files with /E. Before this change, we
would treat unrecognized inputs as object files. Now we pre-process to
stdout as expected. I checked that MSVC defines __cplusplus when invoked
this way, so treating the input as C++ seems like the right thing to do.

After this change, I was able to run midl like this with clang-cl:
$ midl -cpp_cmd clang-cl.exe foo.idl

Things worked for the example IDL file in the Microsoft documentation,
but beyond that, I don't know if this will work well.

Fixes PR40140

llvm-svn: 350072
2018-12-26 21:04:08 +00:00
..
ToolChains [Driver] Disable -faddrsig on Gentoo by default 2018-12-23 15:07:26 +00:00
Action.cpp [modules] Driver support for precompiling a collection of files as a single 2018-09-15 01:21:16 +00:00
CMakeLists.txt [darwin] parse the SDK settings from SDKSettings.json if it exists and 2018-12-17 19:19:15 +00:00
Compilation.cpp Fix MSVC 2015 ambiguous symbol warning introduced by rL344337. NFCI. 2018-10-12 15:16:25 +00:00
DarwinSDKInfo.cpp [darwin] parse the SDK settings from SDKSettings.json if it exists and 2018-12-17 19:19:15 +00:00
Distro.cpp [Distro] Support detecting Gentoo 2018-12-23 15:07:19 +00:00
Driver.cpp [clang-cl] Treat inputs as C++ with /E, like MSVC 2018-12-26 21:04:08 +00:00
DriverOptions.cpp Revert "Revert r311552: [Bash-autocompletion] Add support for static analyzer flags" 2017-08-29 00:09:31 +00:00
InputInfo.h Add an Action* member to InputInfo. 2016-01-11 23:15:21 +00:00
Job.cpp Re-commit r344234 "clang-cl: Add /showFilenames option (PR31957)" 2018-10-13 19:13:14 +00:00
Multilib.cpp [Driver] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2018-03-20 21:08:59 +00:00
Phases.cpp
SanitizerArgs.cpp [asan] Add clang flag -fsanitize-address-use-odr-indicator 2018-12-05 01:44:31 +00:00
Tool.cpp Rename the version of ConstructJob for multiple outputs to ConstructJobMultipleOutputs. 2016-11-03 15:41:50 +00:00
ToolChain.cpp Misc typos fixes in ./lib folder 2018-12-10 12:37:46 +00:00
Types.cpp [modules] Driver support for precompiling a collection of files as a single 2018-09-15 01:21:16 +00:00
XRayArgs.cpp Replace getOS() == llvm::Triple::*BSD with isOS*BSD() [NFCI] 2018-12-20 13:09:30 +00:00