[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


================
@@ -49,6 +51,135 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry)
 
 namespace {
 
+/// Dumps deserialized declarations.
+class DeserializedDeclsLineRangePrinter : public DelegatingDeserializationListener, public ASTConsumer {
+public:
+  explicit DeserializedDeclsLineRangePrinter(SourceManager &SM, std::unique_ptr<llvm::raw_fd_ostream> OS)
+      : DelegatingDeserializationListener(nullptr, false), SM(SM), OS(std::move(OS)) {}
----------------
ilya-biryukov wrote:

I am not sure we can avoid passing `Previous` here and there does not seem to be any code that registers the `DeserializationListener` just yet.

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


More information about the cfe-commits mailing list