aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/MachineConstantPool.h11
-rw-r--r--include/llvm/CodeGen/SelectionDAGNodes.h1
2 files changed, 11 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/MachineConstantPool.h b/include/llvm/CodeGen/MachineConstantPool.h
index ba491ce255..b6bf566f3f 100644
--- a/include/llvm/CodeGen/MachineConstantPool.h
+++ b/include/llvm/CodeGen/MachineConstantPool.h
@@ -29,6 +29,7 @@ class TargetData;
class TargetMachine;
class Type;
class MachineConstantPool;
+class raw_ostream;
/// Abstract base class for all machine specific constantpool value subclasses.
///
@@ -50,8 +51,9 @@ public:
/// print - Implement operator<<...
///
- virtual void print(std::ostream &O) const = 0;
+ void print(std::ostream &O) const;
void print(std::ostream *O) const { if (O) print(*O); }
+ virtual void print(raw_ostream &O) const = 0;
};
inline std::ostream &operator<<(std::ostream &OS,
@@ -59,6 +61,13 @@ inline std::ostream &operator<<(std::ostream &OS,
V.print(OS);
return OS;
}
+
+inline raw_ostream &operator<<(raw_ostream &OS,
+ const MachineConstantPoolValue &V) {
+ V.print(OS);
+ return OS;
+}
+
/// This class is a data container for one entry in a MachineConstantPool.
/// It contains a pointer to the value and an offset from the start of
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h
index 9796e066dd..6c1565916e 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -1260,6 +1260,7 @@ public:
///
std::string getOperationName(const SelectionDAG *G = 0) const;
static const char* getIndexedModeName(ISD::MemIndexedMode AM);
+ void print(raw_ostream &OS, const SelectionDAG *G = 0) const;
void dump() const;
void dump(const SelectionDAG *G) const;