2010-03-19 11:43:15 +01:00
|
|
|
//===-- llvm/MC/MachObjectWriter.h - Mach-O File Writer ---------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_MC_MACHOBJECTWRITER_H
|
|
|
|
#define LLVM_MC_MACHOBJECTWRITER_H
|
|
|
|
|
|
|
|
#include "llvm/MC/MCObjectWriter.h"
|
|
|
|
#include "llvm/Support/raw_ostream.h"
|
|
|
|
#include <cassert>
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class MCAssembler;
|
2010-03-22 21:35:50 +01:00
|
|
|
class MCFragment;
|
2010-05-26 17:18:56 +02:00
|
|
|
class MCFixup;
|
2010-03-19 11:43:15 +01:00
|
|
|
class MCValue;
|
|
|
|
class raw_ostream;
|
|
|
|
|
|
|
|
class MachObjectWriter : public MCObjectWriter {
|
|
|
|
void *Impl;
|
|
|
|
|
|
|
|
public:
|
|
|
|
MachObjectWriter(raw_ostream &OS, bool Is64Bit, bool IsLittleEndian = true);
|
|
|
|
virtual ~MachObjectWriter();
|
|
|
|
|
|
|
|
virtual void ExecutePostLayoutBinding(MCAssembler &Asm);
|
|
|
|
|
|
|
|
virtual void RecordRelocation(const MCAssembler &Asm,
|
2010-03-24 04:43:40 +01:00
|
|
|
const MCAsmLayout &Layout,
|
2010-03-22 21:35:50 +01:00
|
|
|
const MCFragment *Fragment,
|
2010-05-26 17:18:56 +02:00
|
|
|
const MCFixup &Fixup, MCValue Target,
|
2010-03-19 11:43:15 +01:00
|
|
|
uint64_t &FixedValue);
|
|
|
|
|
2010-03-24 04:43:40 +01:00
|
|
|
virtual void WriteObject(const MCAssembler &Asm, const MCAsmLayout &Layout);
|
2010-03-19 11:43:15 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End llvm namespace
|
|
|
|
|
|
|
|
#endif
|