summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-05-06 17:50:50 +0000
committerEric Christopher <echristo@gmail.com>2013-05-06 17:50:50 +0000
commit6c6de847a8446c5b6fe2e974da34ff000d02dc51 (patch)
tree9cc6deb5b56958b59b3530baf3261dff96127b8b /llvm/lib/CodeGen/AsmPrinter/DIE.cpp
parentf0303324beaaeb6b8c2bba1f08072c6e88155360 (diff)
downloadbcm5719-llvm-6c6de847a8446c5b6fe2e974da34ff000d02dc51.tar.gz
bcm5719-llvm-6c6de847a8446c5b6fe2e974da34ff000d02dc51.zip
Remove unnecessary instance variable and rework logic accordingly.
llvm-svn: 181227
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DIE.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DIE.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
index 581dfd16c8b..673867ada1a 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
@@ -114,7 +114,7 @@ DIE::~DIE() {
/// Climb up the parent chain to get the compile unit DIE to which this DIE
/// belongs.
-DIE *DIE::getCompileUnit() const{
+DIE *DIE::getCompileUnit() const {
DIE *p = getParent();
while (p) {
if (p->getTag() == dwarf::DW_TAG_compile_unit)
@@ -125,8 +125,7 @@ DIE *DIE::getCompileUnit() const{
}
#ifndef NDEBUG
-void DIE::print(raw_ostream &O, unsigned IncIndent) {
- IndentCount += IncIndent;
+void DIE::print(raw_ostream &O, unsigned IndentCount) const {
const std::string Indent(IndentCount, ' ');
bool isBlock = Abbrev.getTag() == 0;
@@ -165,11 +164,10 @@ void DIE::print(raw_ostream &O, unsigned IncIndent) {
IndentCount -= 2;
for (unsigned j = 0, M = Children.size(); j < M; ++j) {
- Children[j]->print(O, 4);
+ Children[j]->print(O, IndentCount+4);
}
if (!isBlock) O << "\n";
- IndentCount -= IncIndent;
}
void DIE::dump() {
OpenPOWER on IntegriCloud