- Move conversion of [SU]ADDO from DAG combiner into legalizer.
[oota-llvm.git] / lib / CodeGen / MachOWriter.h
index 6d888320caeba1aa2714f19765c5d62cdf2a2a14..e2b6fa8dd4d9373b5eaedc1619e04ea7ec56fbc7 100644 (file)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by Nate Begeman and is distributed under the
-// University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
@@ -21,6 +21,7 @@
 #include "llvm/Target/TargetData.h"
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Target/TargetMachOWriterInfo.h"
+#include <map>
 
 namespace llvm {
   class GlobalVariable;
@@ -28,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
@@ -89,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 {
@@ -100,7 +102,7 @@ namespace llvm {
   protected:
     /// Output stream to send the resultant object file to.
     ///
-    std::ostream &O;
+    raw_ostream &O;
 
     /// Target machine description.
     ///
@@ -466,7 +468,7 @@ namespace llvm {
       
       const Type *Ty = C->getType();
       if (Ty->isPrimitiveType() || Ty->isInteger()) {
-        unsigned Size = TM.getTargetData()->getTypeSize(Ty);
+        unsigned Size = TM.getTargetData()->getABITypeSize(Ty);
         switch(Size) {
         default: break; // Fall through to __TEXT,__const
         case 4: