summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LexicalScopes.cpp
diff options
context:
space:
mode:
authorManman Ren <mren@apple.com>2013-02-02 00:02:03 +0000
committerManman Ren <mren@apple.com>2013-02-02 00:02:03 +0000
commite498b25bc5c1f009be17fc5241b9c4f9dadac5d9 (patch)
treeb47c2380ef551596226450d57e9deeb0ece0e725 /llvm/lib/CodeGen/LexicalScopes.cpp
parent599171addfcafd1f12d0c9958c12f844309d7e30 (diff)
downloadbcm5719-llvm-e498b25bc5c1f009be17fc5241b9c4f9dadac5d9.tar.gz
bcm5719-llvm-e498b25bc5c1f009be17fc5241b9c4f9dadac5d9.zip
Correct indentation for dumping LexicalScope.
llvm-svn: 174237
Diffstat (limited to 'llvm/lib/CodeGen/LexicalScopes.cpp')
-rw-r--r--llvm/lib/CodeGen/LexicalScopes.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/LexicalScopes.cpp b/llvm/lib/CodeGen/LexicalScopes.cpp
index 3c01d9192f5..81721541cd8 100644
--- a/llvm/lib/CodeGen/LexicalScopes.cpp
+++ b/llvm/lib/CodeGen/LexicalScopes.cpp
@@ -314,24 +314,22 @@ bool LexicalScopes::dominates(DebugLoc DL, MachineBasicBlock *MBB) {
void LexicalScope::anchor() { }
/// dump - Print data structures.
-void LexicalScope::dump() const {
+void LexicalScope::dump(unsigned Indent) const {
#ifndef NDEBUG
raw_ostream &err = dbgs();
- err.indent(IndentLevel);
+ err.indent(Indent);
err << "DFSIn: " << DFSIn << " DFSOut: " << DFSOut << "\n";
const MDNode *N = Desc;
+ err.indent(Indent);
N->dump();
if (AbstractScope)
- err << "Abstract Scope\n";
+ err << std::string(Indent, ' ') << "Abstract Scope\n";
- IndentLevel += 2;
if (!Children.empty())
- err << "Children ...\n";
+ err << std::string(Indent + 2, ' ') << "Children ...\n";
for (unsigned i = 0, e = Children.size(); i != e; ++i)
if (Children[i] != this)
- Children[i]->dump();
-
- IndentLevel -= 2;
+ Children[i]->dump(Indent + 2);
#endif
}
OpenPOWER on IntegriCloud