aganea added a comment.

@hans : Simply because `ExecuteCC1Tool()` lives in the clang tool 
(`clang/tools/driver/driver.cpp`) and we're calling it from the clangDriver.lib 
(`clang/lib/Driver/Job.cpp`). The clangDriver.lib is linked into many other 
tools (clang-refactor, clang-rename, clang-diff, clang-check, libclang, ...) If 
I reference the cc1 function directly, we end of with linker errors in all 
those tools.
We could //maybe// move the tool code into the clangDriver.lib, but I'm not 
sure it's practical as the tool pulls on many other libraries. I thought the 
callback was the path of least resistance. Let me know if we could do it 
otherwise.


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

Reply via email to