Fix printing of PseudoSourceValues in SDNode graphs.
llvm-svn: 61036
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
index 03b78c3..a528c80 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
@@ -202,12 +202,10 @@
Op += '<';
if (!V) {
Op += "(unknown)";
- } else if (isa<PseudoSourceValue>(V)) {
+ } else if (const PseudoSourceValue *PSV = dyn_cast<PseudoSourceValue>(V)) {
// PseudoSourceValues don't have names, so use their print method.
- {
- raw_string_ostream OSS(Op);
- OSS << *M->MO.getValue();
- }
+ raw_string_ostream OSS(Op);
+ PSV->print(OSS);
} else {
Op += V->getName();
}