Expose new print methods
authorChris Lattner <sabre@nondot.org>
Thu, 30 Oct 2003 23:41:19 +0000 (23:41 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 30 Oct 2003 23:41:19 +0000 (23:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9620 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/BasicBlock.h
include/llvm/Function.h
include/llvm/Instruction.h
include/llvm/Module.h

index 506bf3a3c237bb4a0ea6677537a92ef2bac8eb54..1a996bcf265ee597fed78f06f9b672eafdf10401 100644 (file)
@@ -122,7 +122,8 @@ public:
   const InstListType &getInstList() const { return InstList; }
         InstListType &getInstList()       { return InstList; }
 
-  virtual void print(std::ostream &OS) const;
+  virtual void print(std::ostream &OS) const { print(OS, 0); }
+  void print(std::ostream &OS, AssemblyAnnotationWriter *AAW) const;
 
   /// Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const BasicBlock *BB) { return true; }
index 7d4f43fb76a1a04ff488ce6d72135241bd4b7554..3c44b3658f298f89558adeb9a6f332a21dc7cd3b 100644 (file)
@@ -181,7 +181,8 @@ public:
   const Argument           &aback() const { return ArgumentList.back(); }
         Argument           &aback()       { return ArgumentList.back(); }
 
-  virtual void print(std::ostream &OS) const;
+  virtual void print(std::ostream &OS) const { print(OS, 0); }
+  void print(std::ostream &OS, AssemblyAnnotationWriter *AAW) const;
 
   /// viewCFG - This function is meant for use from the debugger.  You can just
   /// say 'call F->viewCFG()' and a ghostview window should pop up from the
index f23fe32ef359982d3e6ebb74421a3e3343fd7212..264356ca91eaa8572824bedc5c0352a58c568926 100644 (file)
@@ -17,6 +17,8 @@
 
 #include "llvm/User.h"
 
+class AssemblyAnnotationWriter;
+
 template<typename SC> struct ilist_traits;
 template<typename ValueSubClass, typename ItemParentClass, typename SymTabClass,
          typename SubClass> class SymbolTableListTraits;
@@ -108,7 +110,8 @@ public:
   }
   static bool isTrapping(unsigned op);
   
-  virtual void print(std::ostream &OS) const;
+  virtual void print(std::ostream &OS) const { print(OS, 0); }
+  void print(std::ostream &OS, AssemblyAnnotationWriter *AAW) const;
 
   /// Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const Instruction *I) { return true; }
index bb9159678d73df0cd93ec75fcfd58de5c9d5ba34..19626aea03b3f35e4e128406bc5217f0127d8915 100644 (file)
@@ -187,7 +187,9 @@ public:
   inline const Function          &back() const { return FunctionList.back(); }
   inline       Function          &back()       { return FunctionList.back(); }
 
-  void print(std::ostream &OS) const;
+  void print(std::ostream &OS) const { print(OS, 0); }
+  void print(std::ostream &OS, AssemblyAnnotationWriter *AAW) const;
+
   void dump() const;
 
   /// dropAllReferences() - This function causes all the subinstructions to "let