[PATCH] D69825: [Clang][Driver] Bypass cc1 process and re-enter driver main
Alexandre Ganea via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 19 14:15:20 PST 2019
aganea added inline comments.
================
Comment at: clang/lib/Driver/Job.cpp:347
+ StringRef DriverExe = llvm::sys::path::stem(D.ClangExecutable);
+ if (CommandExe.equals_lower(DriverExe))
+ CC1Main = Driver::CC1Main;
----------------
hans wrote:
> Now that we're not calling main() anymore, but cc1 directly -- is this checking still necessary?
Yes it is - see my other comment just above.
The driver builds phases that do not always call the cc1 process. Simply stating `clang a.cpp` would invoke `clang -cc1`, then the linker, say `link.exe`. In this later case (invoking `link.exe`), even if we have `Driver::Main` it doesn't mean we should use it. There are a number of other edge cases of the same kind, such as `/fallback` or building cuda files, where a different executable is invoked along the way."
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69825/new/
https://reviews.llvm.org/D69825
More information about the cfe-commits
mailing list