From c1dd7f90132a8a767d91f9b2b3e2bf1a9d7aa04f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Thu, 27 Oct 2022 06:19:19 +0200 Subject: [PATCH] [clang][Interp][NFC] Print more info in Program::dump() Number of functions and global variables is useful to know. --- clang/lib/AST/Interp/Disasm.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clang/lib/AST/Interp/Disasm.cpp b/clang/lib/AST/Interp/Disasm.cpp index 9fc22f2..db68887 100644 --- a/clang/lib/AST/Interp/Disasm.cpp +++ b/clang/lib/AST/Interp/Disasm.cpp @@ -72,6 +72,10 @@ LLVM_DUMP_METHOD void Function::dump(llvm::raw_ostream &OS) const { LLVM_DUMP_METHOD void Program::dump() const { dump(llvm::errs()); } LLVM_DUMP_METHOD void Program::dump(llvm::raw_ostream &OS) const { + OS << ":: Program\n"; + OS << "Global Variables: " << Globals.size() << "\n"; + OS << "Functions: " << Funcs.size() << "\n"; + OS << "\n"; for (auto &Func : Funcs) { Func.second->dump(); } -- 2.7.4