[PATCH] D130620: Fix lack of cc1 flag in llvmcmd sections when assertions are enabled
Jan Svoboda via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 27 12:16:29 PDT 2022
jansvoboda11 added a comment.
Thanks for the fix! Left one suggestion.
================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:4549
+ Invocation.generateCC1CommandLine(Args, SA);
+ Args.insert(Args.begin(), "-cc1");
+ },
----------------
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.
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