X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FMachOWriter.h;h=e2b6fa8dd4d9373b5eaedc1619e04ea7ec56fbc7;hb=8ac0d4b4fb10406278cd600214cd3ee6d76620cd;hp=d4c146d3bfe4ec9665f5445053b10961429342c3;hpb=794fd75c67a2cdc128d67342c6d88a504d186896;p=oota-llvm.git diff --git a/lib/CodeGen/MachOWriter.h b/lib/CodeGen/MachOWriter.h index d4c146d3bfe..e2b6fa8dd4d 100644 --- a/lib/CodeGen/MachOWriter.h +++ b/lib/CodeGen/MachOWriter.h @@ -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 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 @@ -84,12 +86,12 @@ namespace llvm { class MachOWriter : public MachineFunctionPass { friend class MachOCodeEmitter; public: - static const int ID; + static char ID; MachineCodeEmitter &getMachineCodeEmitter() const { 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: