mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 21:32:39 +00:00
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
This commit is contained in:
parent
544e0d0e52
commit
d71703deec
@ -28,6 +28,12 @@ namespace llvm {
|
||||
public:
|
||||
PseudoSourceValue();
|
||||
|
||||
/// dump - Support for debugging, callable in GDB: V->dump()
|
||||
//
|
||||
virtual void dump() const;
|
||||
|
||||
/// print - Implement operator<< on PseudoSourceValue.
|
||||
///
|
||||
virtual void print(raw_ostream &OS) const;
|
||||
|
||||
/// isConstant - Test whether this PseudoSourceValue has a constant value.
|
||||
|
@ -41,6 +41,10 @@ static const char *const PSVNames[] = {
|
||||
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];
|
||||
}
|
||||
|
@ -1759,8 +1759,7 @@ void Value::print(raw_ostream &OS, AssemblyAnnotationWriter *AAW) const {
|
||||
} 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!");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user