[llvm] r215421 - IR: Print a newline when dumping Types
Justin Bogner
mail at justinbogner.com
Mon Aug 11 20:24:59 PDT 2014
Author: bogner
Date: Mon Aug 11 22:24:59 2014
New Revision: 215421
URL: http://llvm.org/viewvc/llvm-project?rev=215421&view=rev
Log:
IR: Print a newline when dumping Types
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.
Modified:
llvm/trunk/lib/IR/AsmWriter.cpp
llvm/trunk/lib/Linker/LinkModules.cpp
llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
Modified: llvm/trunk/lib/IR/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AsmWriter.cpp?rev=215421&r1=215420&r2=215421&view=diff
==============================================================================
--- llvm/trunk/lib/IR/AsmWriter.cpp (original)
+++ llvm/trunk/lib/IR/AsmWriter.cpp Mon Aug 11 22:24:59 2014
@@ -2290,7 +2290,7 @@ void Value::printAsOperand(raw_ostream &
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); }
Modified: llvm/trunk/lib/Linker/LinkModules.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=215421&r1=215420&r2=215421&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/LinkModules.cpp (original)
+++ llvm/trunk/lib/Linker/LinkModules.cpp Mon Aug 11 22:24:59 2014
@@ -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';
}
}
Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=215421&r1=215420&r2=215421&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Mon Aug 11 22:24:59 2014
@@ -10981,6 +10981,6 @@ bool ARMTargetLowering::functionArgument
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;
}
More information about the llvm-commits
mailing list