hans added a comment. Thanks for the update! I think calling ExecuteCC1Tool instead of main is an improvement (there's no need to think about "re-entering" the process, it's really just a function call). I still don't see why it needs to go through a function pointer. I was hoping the code could be something like:
In Command::Execute: if the tool we're going to execute is cc1 (not the gen-reproducer though), then instead of forking, call ExecuteCC1Tool with the args directly (inside a context so that we can recover from a crash) Do you think that's achievable? ================ Comment at: clang/include/clang/Driver/Driver.h:209 + typedef int(*CC1ToolFunc)(ArrayRef<const char *> argv); + static LLVM_THREAD_LOCAL CC1ToolFunc CC1Main; + ---------------- Why do we need a variable for this? Couldn't the code just invoke the function directly? 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