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 | a078d83e17a9c137be78d9351ee63a1c6358b567 (patch) | |
tree | 225d1cdd45c2de89c412ea692ab05ad08f8c1c70 /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | 8fa17424f7cb37b7a1fcf752c49396324cb5031f (diff) | |
download | bcm5719-llvm-a078d83e17a9c137be78d9351ee63a1c6358b567.tar.gz bcm5719-llvm-a078d83e17a9c137be78d9351ee63a1c6358b567.zip |
simplify PseudoSourceValue printing a bit. Unnest all of PseudoSourceValue.cpp from the llvm namespace.
llvm-svn: 55293
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 41df5df5a56..27e3f663258 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/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() << "]"; |