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

Viktoriia Bakalova via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 3 04:29:47 PDT 2025


================
@@ -121,6 +252,19 @@ FrontendAction::CreateWrappedASTConsumer(CompilerInstance &CI,
   if (!Consumer)
     return nullptr;
 
+  std::vector<std::unique_ptr<ASTConsumer>> Consumers;
+  llvm::StringRef PrintDeserializedDeclarationsPath = CI.getFrontendOpts().PrintDeserializedDeclarationsPath;
+  if (!PrintDeserializedDeclarationsPath.empty()) {
+    std::error_code ErrorCode;
+    auto* FileStream = new llvm::raw_fd_ostream(PrintDeserializedDeclarationsPath, ErrorCode, llvm::sys::fs::OF_None);
----------------
VitaNuo wrote:

Makes sense, thank you.

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


More information about the cfe-commits mailing list