From edfb72c6288118ab9c900a560ded89dfaa107296 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 24 Aug 2008 20:37:32 +0000 Subject: 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 --- lib/CodeGen/MachineInstr.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/CodeGen/MachineInstr.cpp') 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 using namespace llvm; @@ -756,9 +757,10 @@ void MachineInstr::print(std::ostream &OS, const TargetMachine *TM) const { OS << ""; else if (!V->getName().empty()) OS << V->getName(); - else if (const PseudoSourceValue *PSV = dyn_cast(V)) - OS << *PSV; - else + else if (const PseudoSourceValue *PSV = dyn_cast(V)) { + raw_os_ostream OSS(OS); + PSV->print(OSS); + } else OS << V; OS << " + " << MRO.getOffset() << "]"; -- cgit v1.2.3