[Mlir-commits] [clang] [flang] [mlir] [clang][flang][mlir] Support -frecord-command-line option (PR #102975)

Tarun Prabhu llvmlistbot at llvm.org
Mon Sep 16 07:39:21 PDT 2024


tarunprabhu 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. 

https://github.com/llvm/llvm-project/pull/102975


More information about the Mlir-commits mailing list