v.g.vassilev added inline comments.
================ Comment at: clang/include/clang/Sema/Sema.h:2211 + std::optional<std::function<FunctionDecl *(Expr *)>> ValuePrintingTransformer; + ---------------- Instead of doing this, we could implement an ASTConsumer which the Interpreter can attach to Sema and listen for `HandleTopLevelDecl`. If we encounter a `TopLevelStmtDecl` we add our facilities and pass it to CodeGen. ================ Comment at: clang/lib/CodeGen/CodeGenModule.cpp:7226 + // assert(DeferredDeclsToEmit.empty() && + // "Should have emitted all decls deferred to emit."); assert(NewBuilder->DeferredDecls.empty() && ---------------- That should probably be a separate review with a testcase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits