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 MCWinCOFFObjectTargetWriter {
20 virtual void anchor();
21 const unsigned Machine;
24 MCWinCOFFObjectTargetWriter(unsigned Machine_);
27 virtual ~MCWinCOFFObjectTargetWriter() {}
29 unsigned getMachine() const { return Machine; }
30 virtual unsigned getRelocType(const MCValue &Target,
32 bool IsCrossSection) const = 0;
33 virtual bool recordRelocation(const MCFixup &) const { return true; }
36 /// \brief Construct a new Win COFF writer instance.
38 /// \param MOTW - The target specific WinCOFF writer subclass.
39 /// \param OS - The stream to write to.
40 /// \returns The constructed object writer.
41 MCObjectWriter *createWinCOFFObjectWriter(MCWinCOFFObjectTargetWriter *MOTW,
43 } // End llvm namespace