Get rid of 3 non-DebugLoc getNode variants.
[oota-llvm.git] / lib / CodeGen / MachOWriter.h
index 44fa7d4d4492bfd4e57da1f105184e4b0a4db328..aacaf2c9e038cb9bcc7e2c99e0ee1461c0c1074a 100644 (file)
@@ -29,6 +29,7 @@ namespace llvm {
   class MachineCodeEmitter;
   class MachOCodeEmitter;
   class OutputBuffer;
+  class raw_ostream;
 
   /// MachOSym - This struct contains information about each symbol that is
   /// added to logical symbol table for the module.  This is eventually
@@ -90,7 +91,7 @@ namespace llvm {
       return *(MachineCodeEmitter*)MCE;
     }
 
-    MachOWriter(std::ostream &O, TargetMachine &TM);
+    MachOWriter(raw_ostream &O, TargetMachine &TM);
     virtual ~MachOWriter();
 
     virtual const char *getPassName() const {
@@ -101,7 +102,7 @@ namespace llvm {
   protected:
     /// Output stream to send the resultant object file to.
     ///
-    std::ostream &O;
+    raw_ostream &O;
 
     /// Target machine description.
     ///
@@ -467,7 +468,7 @@ namespace llvm {
       
       const Type *Ty = C->getType();
       if (Ty->isPrimitiveType() || Ty->isInteger()) {
-        unsigned Size = TM.getTargetData()->getABITypeSize(Ty);
+        unsigned Size = TM.getTargetData()->getTypePaddedSize(Ty);
         switch(Size) {
         default: break; // Fall through to __TEXT,__const
         case 4: