Have PseudoSourceValue override Value::dump, so that it works
on PseudoSourceValue values. This also fixes a FIXME in
lib/VMCode/AsmWriter.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60507 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/PseudoSourceValue.cpp b/lib/CodeGen/PseudoSourceValue.cpp
index 5247906..d0ea706 100644
--- a/lib/CodeGen/PseudoSourceValue.cpp
+++ b/lib/CodeGen/PseudoSourceValue.cpp
@@ -41,6 +41,10 @@
 PseudoSourceValue::PseudoSourceValue() :
   Value(PointerType::getUnqual(Type::Int8Ty), PseudoSourceValueVal) {}
 
+void PseudoSourceValue::dump() const {
+  print(errs()); errs() << '\n'; errs().flush();
+}
+
 void PseudoSourceValue::print(raw_ostream &OS) const {
   OS << PSVNames[this - *PSVs];
 }
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index 2f6c1cc..41929fa 100644
--- a/lib/VMCore/AsmWriter.cpp
+++ b/lib/VMCore/AsmWriter.cpp
@@ -1759,8 +1759,7 @@
   } else if (isa<InlineAsm>(this)) {
     WriteAsOperand(OS, this, true, 0);
   } else {
-    // FIXME: PseudoSourceValue breaks this!
-    //assert(0 && "Unknown value to print out!");
+    assert(0 && "Unknown value to print out!");
   }
 }