Fix some fixme's in #if 0'd code by making it dependent on the structural
[oota-llvm.git] / lib / CodeGen / PseudoSourceValue.cpp
index 8c9de810597dbd9ef8334aa093cb7f503f5db863..81cbfb83d2fc7d40c1b0e8c6cff95cfc35cadccc 100644 (file)
@@ -15,6 +15,7 @@
 #include "llvm/CodeGen/PseudoSourceValue.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/Support/Compiler.h"
+#include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/raw_ostream.h"
 #include <map>
@@ -41,6 +42,10 @@ static const char *const PSVNames[] = {
 PseudoSourceValue::PseudoSourceValue() :
   Value(PointerType::getUnqual(Type::Int8Ty), PseudoSourceValueVal) {}
 
+void PseudoSourceValue::dump() const {
+  print(errs()); errs() << '\n';
+}
+
 void PseudoSourceValue::print(raw_ostream &OS) const {
   OS << PSVNames[this - *PSVs];
 }
@@ -57,9 +62,6 @@ namespace {
 
     virtual bool isConstant(const MachineFrameInfo *MFI) const;
 
-    virtual void print(std::ostream &OS) const {
-      OS << "FixedStack" << FI;
-    }
     virtual void print(raw_ostream &OS) const {
       OS << "FixedStack" << FI;
     }
@@ -82,7 +84,7 @@ bool PseudoSourceValue::isConstant(const MachineFrameInfo *) const {
       this == getConstantPool() ||
       this == getJumpTable())
     return true;
-  assert(0 && "Unknown PseudoSourceValue!");
+  llvm_unreachable("Unknown PseudoSourceValue!");
   return false;
 }