//
// 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.
//
//===----------------------------------------------------------------------===//
//
#include "llvm/CodeGen/MachineFunctionPass.h"
#include <list>
+#include <map>
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
class ELFWriter : public MachineFunctionPass {
friend class ELFCodeEmitter;
public:
- static const int ID;
+ 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<unsigned char> DataBuffer;
protected:
/// Output stream to send the resultant object file to.
///
- std::ostream &O;
+ raw_ostream &O;
/// Target machine description.
///
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;