[llvm-commits] [llvm] r61036 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp

Dan Gohman gohman at apple.com
Mon Dec 15 09:28:10 PST 2008


Author: djg
Date: Mon Dec 15 11:28:10 2008
New Revision: 61036

URL: http://llvm.org/viewvc/llvm-project?rev=61036&view=rev
Log:
Fix printing of PseudoSourceValues in SDNode graphs.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp?rev=61036&r1=61035&r2=61036&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp Mon Dec 15 11:28:10 2008
@@ -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();
     }





More information about the llvm-commits mailing list