projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d6a01fe
)
Include id2ast pointers when dumping AST
author
Clifford Wolf
<clifford@clifford.at>
Wed, 5 Mar 2014 18:56:31 +0000
(19:56 +0100)
committer
Clifford Wolf
<clifford@clifford.at>
Wed, 5 Mar 2014 18:56:31 +0000
(19:56 +0100)
frontends/ast/ast.cc
patch
|
blob
|
history
diff --git
a/frontends/ast/ast.cc
b/frontends/ast/ast.cc
index d9ad6d8ef7e6b5a84b56117f1580ea4faa00e534..f2f2d0e69fe466e146ead3986fc1d5bf5ca20866 100644
(file)
--- 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()) {