diff options
author | Chris Lattner <sabre@nondot.org> | 2009-02-28 21:11:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-02-28 21:11:05 +0000 |
commit | 20e758e95c476126ebd38a3485cfc70800bcd851 (patch) | |
tree | 154eb72f42192dde1e445a00bf7d14bb100fb681 /lib/VMCore | |
parent | d131008b4e304d5963347e60eaaca8a8270e1ff5 (diff) | |
download | external_llvm-20e758e95c476126ebd38a3485cfc70800bcd851.zip external_llvm-20e758e95c476126ebd38a3485cfc70800bcd851.tar.gz external_llvm-20e758e95c476126ebd38a3485cfc70800bcd851.tar.bz2 |
simplifications
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65721 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index bd3f0b7..8e0efd0 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -1650,11 +1650,12 @@ void Type::print(std::ostream &o) const { 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 @@ void Value::print(raw_ostream &OS, AssemblyAnnotationWriter *AAW) const { 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, |