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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D69825: [Clang][Dr... Alexandre Ganea via Phabricator via cfe-commits

Reply via email to