diff options
author | Chris Lattner <sabre@nondot.org> | 2008-08-24 20:37:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-08-24 20:37:32 +0000 |
commit | 24ae2a98650e6390dd3bb2d5d6870370798a728c (patch) | |
tree | 9ba65331e43056383bc4f8af02bed3d13fccba3a /lib/CodeGen/MachineInstr.cpp | |
parent | 13d6e7350b37480c9026c75c3586b7a2075d3615 (diff) | |
download | external_llvm-24ae2a98650e6390dd3bb2d5d6870370798a728c.tar.gz external_llvm-24ae2a98650e6390dd3bb2d5d6870370798a728c.tar.bz2 external_llvm-24ae2a98650e6390dd3bb2d5d6870370798a728c.zip |
simplify PseudoSourceValue printing a bit. Unnest all of PseudoSourceValue.cpp from the llvm namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55293 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | lib/CodeGen/MachineInstr.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index 41df5df5a5..27e3f66325 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/lib/CodeGen/MachineInstr.cpp @@ -24,6 +24,7 @@ #include "llvm/Support/LeakDetector.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/Streams.h" +#include "llvm/Support/raw_ostream.h" #include "llvm/ADT/FoldingSet.h" #include <ostream> using namespace llvm; @@ -756,9 +757,10 @@ void MachineInstr::print(std::ostream &OS, const TargetMachine *TM) const { OS << "<unknown>"; else if (!V->getName().empty()) OS << V->getName(); - else if (const PseudoSourceValue *PSV = dyn_cast<PseudoSourceValue>(V)) - OS << *PSV; - else + else if (const PseudoSourceValue *PSV = dyn_cast<PseudoSourceValue>(V)) { + raw_os_ostream OSS(OS); + PSV->print(OSS); + } else OS << V; OS << " + " << MRO.getOffset() << "]"; |