From 09805ee9ec0408bdc68b914927899f02371efcb7 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 5 Mar 2014 19:56:31 +0100 Subject: Include id2ast pointers when dumping AST --- frontends/ast/ast.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'frontends/ast') diff --git a/frontends/ast/ast.cc b/frontends/ast/ast.cc index d9ad6d8e..f2f2d0e6 100644 --- a/frontends/ast/ast.cc +++ b/frontends/ast/ast.cc @@ -244,6 +244,12 @@ void AstNode::dumpAst(FILE *f, std::string indent) std::string type_name = type2str(type); fprintf(f, "%s%s <%s:%d>", indent.c_str(), type_name.c_str(), filename.c_str(), linenum); + + if (id2ast) + fprintf(f, " [%p -> %p]", this, id2ast); + else + fprintf(f, " [%p]", this); + if (!str.empty()) fprintf(f, " str='%s'", str.c_str()); if (!bits.empty()) { -- cgit v1.2.3