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
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index 41df5df..27e3f66 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 @@
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() << "]";