LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 MCFixup;
15  class MCObjectWriter;
16  class MCValue;
17  class raw_ostream;
18 
20  virtual void anchor();
21  const unsigned Machine;
22 
23  protected:
24  MCWinCOFFObjectTargetWriter(unsigned Machine_);
25 
26  public:
28 
29  unsigned getMachine() const { return Machine; }
30  virtual unsigned getRelocType(const MCValue &Target,
31  const MCFixup &Fixup,
32  bool IsCrossSection) const = 0;
33  };
34 
35  /// \brief Construct a new Win COFF writer instance.
36  ///
37  /// \param MOTW - The target specific WinCOFF writer subclass.
38  /// \param OS - The stream to write to.
39  /// \returns The constructed object writer.
40  MCObjectWriter *createWinCOFFObjectWriter(MCWinCOFFObjectTargetWriter *MOTW,
41  raw_ostream &OS);
42 } // End llvm namespace
43 
44 #endif
MCObjectWriter * createWinCOFFObjectWriter(MCWinCOFFObjectTargetWriter *MOTW, raw_ostream &OS)
Construct a new Win COFF writer instance.
virtual unsigned getRelocType(const MCValue &Target, const MCFixup &Fixup, bool IsCrossSection) const =0