llvm.org GIT mirror llvm / d71703d
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 Dan Gohman 11 years ago
3 changed file(s) with 11 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
2727 public:
2828 PseudoSourceValue();
2929
30 /// dump - Support for debugging, callable in GDB: V->dump()
31 //
32 virtual void dump() const;
33
34 /// print - Implement operator<< on PseudoSourceValue.
35 ///
3036 virtual void print(raw_ostream &OS) const;
3137
3238 /// isConstant - Test whether this PseudoSourceValue has a constant value.
3939
4040 PseudoSourceValue::PseudoSourceValue() :
4141 Value(PointerType::getUnqual(Type::Int8Ty), PseudoSourceValueVal) {}
42
43 void PseudoSourceValue::dump() const {
44 print(errs()); errs() << '\n'; errs().flush();
45 }
4246
4347 void PseudoSourceValue::print(raw_ostream &OS) const {
4448 OS << PSVNames[this - *PSVs];
17581758 } else if (isa(this)) {
17591759 WriteAsOperand(OS, this, true, 0);
17601760 } else {
1761 // FIXME: PseudoSourceValue breaks this!
1762 //assert(0 && "Unknown value to print out!");
1761 assert(0 && "Unknown value to print out!");
17631762 }
17641763 }
17651764