1 //===-- llvm/MC/MCWinCOFFObjectWriter.h - Win COFF Object Writer *- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_MC_MCWINCOFFOBJECTWRITER_H
11 #define LLVM_MC_MCWINCOFFOBJECTWRITER_H
19 class raw_pwrite_stream;
21 class MCWinCOFFObjectTargetWriter {
22 virtual void anchor();
23 const unsigned Machine;
26 MCWinCOFFObjectTargetWriter(unsigned Machine_);
29 virtual ~MCWinCOFFObjectTargetWriter() {}
31 unsigned getMachine() const { return Machine; }
32 virtual unsigned getRelocType(const MCValue &Target, const MCFixup &Fixup,
34 const MCAsmBackend &MAB) const = 0;
35 virtual bool recordRelocation(const MCFixup &) const { return true; }
38 /// \brief Construct a new Win COFF writer instance.
40 /// \param MOTW - The target specific WinCOFF writer subclass.
41 /// \param OS - The stream to write to.
42 /// \returns The constructed object writer.
43 MCObjectWriter *createWinCOFFObjectWriter(MCWinCOFFObjectTargetWriter *MOTW,
44 raw_pwrite_stream &OS);
45 } // End llvm namespace