Debugging: Show tree file writes, commentary

This commit is contained in:
Wilson Snyder
2012-04-28 12:22:38 -04:00
parent 641024c235
commit 3ba36dc30c
3 changed files with 12 additions and 2 deletions
+1
View File
@@ -1011,6 +1011,7 @@ void AstNode::dumpTreeAndNext(ostream& os, const string& indent, int maxDepth) {
void AstNode::dumpTreeFile(const string& filename, bool append) {
if (v3Global.opt.dumpTree()) {
{ // Write log & close
UINFO(2,"Dumping "<<filename<<endl);
const auto_ptr<ofstream> logsp (V3File::new_ofstream(filename, append));
if (logsp->fail()) v3fatalSrc("Can't write "<<filename);
*logsp<<"Tree Dump from <e"<<dec<<editCountLast()<<">";