MaskRay wrote:

> > Why do we need the two new files?
> > We have clang/lib/Driver/ToolChains/CommonArgs.cpp and 
> > clang/lib/Driver/ToolChain.cpp for shared code.
> 
> Since most of the code in `CommonArgs.cpp` had to do with functions in the 
> `clang::driver::tools` namespace, I wasn't sure that code that is only shared 
> between `Clang.cpp` and `Flang.cpp` ought to go there. The other function 
> that was moved is a utility function to escape arguments and was originally 
> declared `static` in `Clang.cpp`.
> 
> If it is ok to use `CommandArgs.cpp` for limited sharing and utilities, I can 
> move the code there.

Adding the shared code to `CommonArgs.cpp` LGTM. Shared functions there use 
`tools::`, though.

`rg driver:: clang/lib/Driver` reveals what files define `driver::` member 
functions. `CommonArgs.cpp` doesn't define `driver::`.

https://github.com/llvm/llvm-project/pull/102975
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to