[PATCH] D135108: [llvm-driver] Fix clang -fno-integrated-cc1 when invoked from the llvm driver

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 18 23:11:40 PDT 2022


phosek added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5005
+    const char *PrependArg =
+        D.getOutOfProcessIsLLVMDriver() ? "clang" : nullptr;
     C.addCommand(std::make_unique<Command>(
----------------
Instead of storing a boolean and then duplicating this check and hardcoding the name `"clang"` in multiple places, we could store the name in the `Driver` (for example as `DriverName`) and default it to `null`. It'd be a responsibility of `cc1gen_reproducer_main.cpp` and `driver.cpp` to set it.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135108/new/

https://reviews.llvm.org/D135108



More information about the llvm-commits mailing list