Tidy up. 80 columns.
[oota-llvm.git] / include / llvm / Object / MachOObject.h
index 6c0a1d0cad0f98747d1f482e277fd3c73edd1e8c..19a399e62fe34ba8b722207d3c1e8245d21d4bd8 100644 (file)
@@ -19,6 +19,7 @@
 namespace llvm {
 
 class MemoryBuffer;
+class raw_ostream;
 
 namespace object {
 
@@ -102,6 +103,8 @@ public:
     return Is64Bit ? macho::Header64Size : macho::Header32Size;
   }
 
+  StringRef getData(size_t Offset, size_t Size) const;
+
   /// @}
   /// @name String Table Data
   /// @{
@@ -170,7 +173,26 @@ public:
     InMemoryStruct<macho::Symbol64TableEntry> &Res) const;
 
   /// @}
+  
+  /// @name Object Dump Facilities
+  /// @{
+  /// dump - Support for debugging, callable in GDB: V->dump()
+  //
+  void dump() const;
+  void dumpHeader() const;
+  
+  /// print - Implement operator<< on Value.
+  ///
+  void print(raw_ostream &O) const;
+  void printHeader(raw_ostream &O) const;
+
+  /// @}
 };
+  
+inline raw_ostream &operator<<(raw_ostream &OS, const MachOObject &V) {
+  V.print(OS);
+  return OS;
+}
 
 } // end namespace object
 } // end namespace llvm