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 | edfb72c6288118ab9c900a560ded89dfaa107296 (patch) | |
tree | 9ba65331e43056383bc4f8af02bed3d13fccba3a /lib/CodeGen/MachineInstr.cpp | |
parent | 32c727cd95a7718e10e225bb9fc00be6681706aa (diff) |
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() << "]"; |