In order to test the preservation of the original Debug Info metadata in your projects, a front end option could be very useful, since users usually report that a concrete entity (e.g. variable x, or function fn2()) is missing debug info. The [0] is an example of running the utility on GDB Project.
Depends on: D82546 and D82545.
[0] https://djolertrk.github.io/di-checker-html-report-example/
Please, update the new options to use the marshalling infrastructure. You can then remove the code from CompilerInvocation.
https://clang.llvm.org/docs/InternalsManual.html#adding-new-command-line-option