X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FELFWriter.h;h=31aa05a9c4a5bda100e985c47cd6ff093ade193a;hb=b0000c376cf13ed63306622ab9642cfae49f074a;hp=e64a9c946b6db354e5be7b162b2746f03ce6b321;hpb=4b2ca1a3c4231cd05366565e91ce09ec9fc3d3c9;p=oota-llvm.git diff --git a/lib/CodeGen/ELFWriter.h b/lib/CodeGen/ELFWriter.h index e64a9c946b6..31aa05a9c4a 100644 --- a/lib/CodeGen/ELFWriter.h +++ b/lib/CodeGen/ELFWriter.h @@ -2,8 +2,8 @@ // // The LLVM Compiler Infrastructure // -// This file was developed by Chris Lattner 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. // //===----------------------------------------------------------------------===// // @@ -16,12 +16,14 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include +#include namespace llvm { class GlobalVariable; class Mangler; class MachineCodeEmitter; class ELFCodeEmitter; + class raw_ostream; /// ELFWriter - This class implements the common target-independent code for /// writing ELF files. Targets should derive a class from this to @@ -30,11 +32,13 @@ namespace llvm { class ELFWriter : public MachineFunctionPass { friend class ELFCodeEmitter; public: + static char ID; + MachineCodeEmitter &getMachineCodeEmitter() const { return *(MachineCodeEmitter*)MCE; } - ELFWriter(std::ostream &O, TargetMachine &TM); + ELFWriter(raw_ostream &O, TargetMachine &TM); ~ELFWriter(); typedef std::vector DataBuffer; @@ -42,7 +46,7 @@ namespace llvm { protected: /// Output stream to send the resultant object file to. /// - std::ostream &O; + raw_ostream &O; /// Target machine description. /// @@ -88,7 +92,7 @@ namespace llvm { private: // The buffer we accumulate the file header into. Note that this should be - // changed into something much more efficient later (and the bytecode writer + // changed into something much more efficient later (and the bitcode writer // as well!). DataBuffer FileHeader;