[PATCH] D130620: Fix lack of cc1 flag in llvmcmd sections when assertions are enabled

Aiden Grossman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 27 12:44:55 PDT 2022


aidengrossman marked an inline comment as done.
aidengrossman added inline comments.


================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:4549
+        Invocation.generateCC1CommandLine(Args, SA);
+        Args.insert(Args.begin(), "-cc1");
+      },
----------------
jansvoboda11 wrote:
> This will shift all generated arguments in the vector. Could you do something like this instead?
> 
> ```
> Args.push_back("-cc1");
> Invocation.generateCC1CommandLine(Args, SA);
> ```
> 
> I think `generateCC1CommandLine()` //appends// to `Args`, so this should be safe to do.
Fixed. Thanks for the suggestion. Just tested it and everything looks good. For some reason when I was working on it this morning I didn't think it would be that easy.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130620



More information about the cfe-commits mailing list