We are refactoring some code in the Clang Driver so that this can be reused in the Flang Driver without creating a dependency. The proposed patch (⚙ D142347 [NFC][Clang] Move DebugOptions to llvm/Frontend for reuse in Flang) moves the file
llvm/Frontend/Debug. This avoids having to redeclare a very similar enumeration in the Flang Driver code.
The choice of the new location follows a previous approval by the LLVM community for @jdoerfert 's proposal to use
llvm/lib/Frontend as a common directory for sharing code between multiple frontends. [RFC] Create llvm/lib/Frontend
In general we are in the process of investigating further refactoring of the Clang Driver. There have been a few RFCs about this in the past. I believe the Clang project is fine with this as OKed in a reply to a previous RFC ([cfe-dev] RFC: refactoring libclangDriver/libclangFrontend to share with Flang).
Note: Posting this here as per @banach-space’s suggestion in the review of ⚙ D142347 [NFC][Clang] Move DebugOptions to llvm/Frontend for reuse in Flang.