aboutsummaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/CodeGen/MachineMemOperand.h3
-rw-r--r--include/llvm/CodeGen/PseudoSourceValue.h14
-rw-r--r--include/llvm/Value.h7
3 files changed, 15 insertions, 9 deletions
diff --git a/include/llvm/CodeGen/MachineMemOperand.h b/include/llvm/CodeGen/MachineMemOperand.h
index 1b01c4893e..d52d7a6be8 100644
--- a/include/llvm/CodeGen/MachineMemOperand.h
+++ b/include/llvm/CodeGen/MachineMemOperand.h
@@ -22,6 +22,7 @@ namespace llvm {
class Value;
class FoldingSetNodeID;
+class raw_ostream;
//===----------------------------------------------------------------------===//
/// MachineMemOperand - A description of a memory reference used in the backend.
@@ -92,6 +93,8 @@ public:
void Profile(FoldingSetNodeID &ID) const;
};
+raw_ostream &operator<<(raw_ostream &OS, const MachineMemOperand &MRO);
+
} // End llvm namespace
#endif
diff --git a/include/llvm/CodeGen/PseudoSourceValue.h b/include/llvm/CodeGen/PseudoSourceValue.h
index 3ad2502fe0..49eb5a3dc5 100644
--- a/include/llvm/CodeGen/PseudoSourceValue.h
+++ b/include/llvm/CodeGen/PseudoSourceValue.h
@@ -25,17 +25,15 @@ namespace llvm {
/// stack frame (e.g., a spill slot), below the stack frame (e.g., argument
/// space), or constant pool.
class PseudoSourceValue : public Value {
+ private:
+ /// printCustom - Implement printing for PseudoSourceValue. This is called
+ /// from Value::print or Value's operator<<.
+ ///
+ virtual void printCustom(raw_ostream &O) const;
+
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.
///
virtual bool isConstant(const MachineFrameInfo *) const;
diff --git a/include/llvm/Value.h b/include/llvm/Value.h
index 87c4dc2df3..864d4904c8 100644
--- a/include/llvm/Value.h
+++ b/include/llvm/Value.h
@@ -90,13 +90,18 @@ private:
void operator=(const Value &); // Do not implement
Value(const Value &); // Do not implement
+protected:
+ /// printCustom - Value subclasses can override this to implement custom
+ /// printing behavior.
+ virtual void printCustom(raw_ostream &O) const;
+
public:
Value(const Type *Ty, unsigned scid);
virtual ~Value();
/// dump - Support for debugging, callable in GDB: V->dump()
//
- virtual void dump() const;
+ void dump() const;
/// print - Implement operator<< on Value.
///