[clang] [WIP] Implement `print-deserialized-declarations` flag to dump source… (PR #133910)

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 2 04:54:27 PDT 2025


================
@@ -7968,6 +7968,10 @@ def print_dependency_directives_minimized_source : Flag<["-"],
   "print-dependency-directives-minimized-source">,
   HelpText<"Print the output of the dependency directives source minimizer">;
 }
+def print_deserialized_declarations : Joined<["-"],
+  "print-deserialized-declarations-path=">,
+  HelpText<"Print traces of deserialized declarations to aid debugging and minimization">,
+  MarshallingInfoString<FrontendOpts<"PrintDeserializedDeclarationsPath">>;
----------------
ilya-biryukov wrote:

I suggest to make this flag a `CC1Option` so that `clang -print-deserialized-declarations-path` does not work ,but `clang -Xclang=-print-deserialized-declarations-path` is allowed to produce this.

These options are considered internal to the compiler and Clang does not promise any compatibility for those across versions. I think this is what we want to have at this point as more experiments are planned.

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


More information about the cfe-commits mailing list