aidengrossman updated this revision to Diff 448132. aidengrossman added a comment.
Moved insertion of cc1 flag to prevent shifting entire array Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130620/new/ https://reviews.llvm.org/D130620 Files: clang/lib/Frontend/CompilerInvocation.cpp Index: clang/lib/Frontend/CompilerInvocation.cpp =================================================================== --- clang/lib/Frontend/CompilerInvocation.cpp +++ clang/lib/Frontend/CompilerInvocation.cpp @@ -4544,7 +4544,10 @@ return CreateFromArgsImpl(Invocation, CommandLineArgs, Diags, Argv0); }, [](CompilerInvocation &Invocation, SmallVectorImpl<const char *> &Args, - StringAllocator SA) { Invocation.generateCC1CommandLine(Args, SA); }, + StringAllocator SA) { + Args.push_back("-cc1"); + Invocation.generateCC1CommandLine(Args, SA); + }, Invocation, DummyInvocation, CommandLineArgs, Diags, Argv0); }
Index: clang/lib/Frontend/CompilerInvocation.cpp =================================================================== --- clang/lib/Frontend/CompilerInvocation.cpp +++ clang/lib/Frontend/CompilerInvocation.cpp @@ -4544,7 +4544,10 @@ return CreateFromArgsImpl(Invocation, CommandLineArgs, Diags, Argv0); }, [](CompilerInvocation &Invocation, SmallVectorImpl<const char *> &Args, - StringAllocator SA) { Invocation.generateCC1CommandLine(Args, SA); }, + StringAllocator SA) { + Args.push_back("-cc1"); + Invocation.generateCC1CommandLine(Args, SA); + }, Invocation, DummyInvocation, CommandLineArgs, Diags, Argv0); }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits