[llvm-commits] [llvm] r65721 - /llvm/trunk/lib/VMCore/AsmWriter.cpp
Chris Lattner
sabre at nondot.org
Sat Feb 28 13:11:05 PST 2009
Author: lattner
Date: Sat Feb 28 15:11:05 2009
New Revision: 65721
URL: http://llvm.org/viewvc/llvm-project?rev=65721&view=rev
Log:
simplifications
Modified:
llvm/trunk/lib/VMCore/AsmWriter.cpp
Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=65721&r1=65720&r2=65721&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/AsmWriter.cpp (original)
+++ llvm/trunk/lib/VMCore/AsmWriter.cpp Sat Feb 28 15:11:05 2009
@@ -1650,11 +1650,12 @@
print(OS);
}
-void Type::print(raw_ostream &o) const {
- if (this == 0)
- o << "<null Type>";
- else
- o << getDescription();
+void Type::print(raw_ostream &OS) const {
+ if (this == 0) {
+ OS << "<null Type>";
+ return;
+ }
+ TypePrinting(0, OS).print(this);
}
void Value::print(raw_ostream &OS, AssemblyAnnotationWriter *AAW) const {
@@ -1678,8 +1679,9 @@
AssemblyWriter W(OS, SlotTable, GV->getParent(), 0);
W.write(GV);
} else if (const Constant *C = dyn_cast<Constant>(this)) {
- OS << C->getType()->getDescription() << ' ';
TypePrinting TypePrinter(0, OS);
+ TypePrinter.print(C->getType());
+ OS << ' ';
WriteConstantInt(OS, C, TypePrinter, 0);
} else if (const Argument *A = dyn_cast<Argument>(this)) {
WriteAsOperand(OS, this, true,
More information about the llvm-commits
mailing list