LLVM  3.7.0
MCWinCOFFObjectWriter.h
Go to the documentation of this file.
1 //===-- llvm/MC/MCWinCOFFObjectWriter.h - Win COFF Object Writer *- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_MC_MCWINCOFFOBJECTWRITER_H
11 #define LLVM_MC_MCWINCOFFOBJECTWRITER_H
12 
13 namespace llvm {
14 class MCAsmBackend;
15 class MCFixup;
16 class MCObjectWriter;
17 class MCValue;
18 class raw_ostream;
19 class raw_pwrite_stream;
20 
22  virtual void anchor();
23  const unsigned Machine;
24 
25  protected:
26  MCWinCOFFObjectTargetWriter(unsigned Machine_);
27 
28  public:
30 
31  unsigned getMachine() const { return Machine; }
32  virtual unsigned getRelocType(const MCValue &Target, const MCFixup &Fixup,
33  bool IsCrossSection,
34  const MCAsmBackend &MAB) const = 0;
35  virtual bool recordRelocation(const MCFixup &) const { return true; }
36  };
37 
38  /// \brief Construct a new Win COFF writer instance.
39  ///
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
46 
47 #endif
This represents an "assembler immediate".
Definition: MCValue.h:44
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
Definition: MCFixup.h:62
virtual bool recordRelocation(const MCFixup &) const
PowerPC TLS Dynamic Call Fixup
Target - Wrapper for Target specific information.
virtual unsigned getRelocType(const MCValue &Target, const MCFixup &Fixup, bool IsCrossSection, const MCAsmBackend &MAB) const =0
Generic interface to target specific assembler backends.
Definition: MCAsmBackend.h:34
MCObjectWriter * createWinCOFFObjectWriter(MCWinCOFFObjectTargetWriter *MOTW, raw_pwrite_stream &OS)
Construct a new Win COFF writer instance.