]> granicus.if.org Git - llvm/commitdiff
IR: Print a newline when dumping Types
authorJustin Bogner <mail@justinbogner.com>
Tue, 12 Aug 2014 03:24:59 +0000 (03:24 +0000)
committerJustin Bogner <mail@justinbogner.com>
Tue, 12 Aug 2014 03:24:59 +0000 (03:24 +0000)
Type::dump() doesn't print a newline, which makes for a poor
experience in a debugger. This looks like it was an ommission
considering Value::dump() two lines above, so I've changed Type to add
a newline as well.

Of the two in-tree callers, one added a newline anyway, and I've
updated the other one to use Type::print instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215421 91177308-0d34-0410-b5e6-96231b3b80d8

lib/IR/AsmWriter.cpp
lib/Linker/LinkModules.cpp
lib/Target/ARM/ARMISelLowering.cpp

index 8f9122558d31b9dc46042e30f9d4cee64af07715..7fcab5c921b7b8e349c38636bb9aad01af56e1f3 100644 (file)
@@ -2290,7 +2290,7 @@ void Value::printAsOperand(raw_ostream &O, bool PrintType, const Module *M) cons
 void Value::dump() const { print(dbgs()); dbgs() << '\n'; }
 
 // Type::dump - allow easy printing of Types from the debugger.
-void Type::dump() const { print(dbgs()); }
+void Type::dump() const { print(dbgs()); dbgs() << '\n'; }
 
 // Module::dump() - Allow printing of Modules from the debugger.
 void Module::dump() const { print(dbgs(), nullptr); }
index 1748af4740250b485ddac38f227ea67585a76085..c83774f8d03c1933eb2778e7b327167cd621c5b5 100644 (file)
@@ -78,9 +78,9 @@ public:
     for (DenseMap<Type*, Type*>::const_iterator
            I = MappedTypes.begin(), E = MappedTypes.end(); I != E; ++I) {
       dbgs() << "TypeMap: ";
-      I->first->dump();
+      I->first->print(dbgs());
       dbgs() << " => ";
-      I->second->dump();
+      I->second->print(dbgs());
       dbgs() << '\n';
     }
   }
index a47d05ebe81911be698ca88143c9f6d771ce3369..ced7d84162bea09a8867e471c7580c7129d2dc5e 100644 (file)
@@ -10981,6 +10981,6 @@ bool ARMTargetLowering::functionArgumentNeedsConsecutiveRegisters(
   HABaseType Base = HA_UNKNOWN;
   uint64_t Members = 0;
   bool result = isHomogeneousAggregate(Ty, Base, Members);
-  DEBUG(dbgs() << "isHA: " << result << " "; Ty->dump(); dbgs() << "\n");
+  DEBUG(dbgs() << "isHA: " << result << " "; Ty->dump());
   return result;
 }