* Add virtual print methods
authorChris Lattner <sabre@nondot.org>
Mon, 8 Apr 2002 21:56:02 +0000 (21:56 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 8 Apr 2002 21:56:02 +0000 (21:56 +0000)
* s/Method/Function

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2172 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/BasicBlock.h
include/llvm/Constants.h
include/llvm/Function.h
include/llvm/GlobalVariable.h
include/llvm/Instruction.h
include/llvm/Module.h
include/llvm/iOther.h

index 16f2ffebeca2384d486270899b60157af4ed302d..d8bb6604798b718d822569d0bc561f929618a4ea 100644 (file)
@@ -104,6 +104,8 @@ public:
   const InstListType &getInstList() const { return InstList; }
         InstListType &getInstList()       { return InstList; }
 
+  virtual void print(std::ostream &OS) const;
+
   // Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const BasicBlock *BB) { return true; }
   static inline bool classof(const Value *V) {
index 1a4ebda6ec2cf3cb0af2e6df528260a3a1ca663d..dd7147e2d003ae19965fc859199e926a6909bf03 100644 (file)
@@ -47,6 +47,8 @@ public:
   // getNullConstant.
   virtual bool isNullValue() const = 0;
 
+  virtual void print(std::ostream &O) const;
+
   // Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const Constant *) { return true; }
   static inline bool classof(const Value *V) {
index 4621694041d201a019f0b84bbe19bb32a05710b2..322cb8af7b539087d8d3713efeac785edf746446 100644 (file)
@@ -83,6 +83,7 @@ public:
   inline const BasicBlock        *back() const { return BasicBlocks.back(); }
   inline       BasicBlock        *back()       { return BasicBlocks.back(); }
 
+  virtual void print(std::ostream &OS) const;
 
   // Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const Function *) { return true; }
index 9f10f719ef290d395c905772e994d6d856e7c483..79507a56702c93b8085deb09ac588136e2a979c2 100644 (file)
@@ -59,6 +59,8 @@ public:
   //
   inline bool isConstant() const { return isConstantGlobal; }
 
+  virtual void print(std::ostream &OS) const;
+
   // Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const GlobalVariable *) { return true; }
   static inline bool classof(const Value *V) {
index ba39fd2344f282ace4dc723392a888145f7bcac5..cf7ce7dd50dd5b71d2aba9bff98cdb9c210e675d 100644 (file)
@@ -13,7 +13,7 @@
 class Instruction : public User {
   BasicBlock *Parent;
 
-  friend class ValueHolder<Instruction,BasicBlock,Method>;
+  friend class ValueHolder<Instruction,BasicBlock,Function>;
   inline void setParent(BasicBlock *P) { Parent = P; }
 protected:
   unsigned iType;      // InstructionType
@@ -60,6 +60,8 @@ public:
     return iType >= FirstBinaryOp && iType < NumBinaryOps;
   }
 
+  virtual void print(std::ostream &OS) const;
+
   // Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const Instruction *I) { return true; }
   static inline bool classof(const Value *V) {
index bc7f564a8fd29e7eadfc5c1efba9fe551c382452..d94500aed45ee121a993deeaa774275b17943b57 100644 (file)
@@ -120,6 +120,8 @@ public:
     return V->getValueType() == Value::ModuleVal;
   }
 
+  virtual void print(std::ostream &OS) const;
+
   // dropAllReferences() - This function causes all the subinstructions to "let
   // go" of all references that they are maintaining.  This allows one to
   // 'delete' a whole class at a time, even though there may be circular
index a961eca83bd9777d9f082ffcf70ddc1bb85f8cf7..3e3bfc4bfd3da908c47553a574c8ebdb60ad78a0 100644 (file)
@@ -66,6 +66,8 @@ public:
   inline const Function *getParent() const { return Parent; }
   inline       Function *getParent()       { return Parent; }
 
+  virtual void print(std::ostream &OS) const;
+
   // Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const FunctionArgument *) { return true; }
   static inline bool classof(const Value *V) {