MCWinCOFFObjectWriter.h revision d04a8d4b33ff316ca4cf961e06c9e312eff8e64f
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 13namespace llvm { 14 class MCObjectWriter; 15 class raw_ostream; 16 17 class MCWinCOFFObjectTargetWriter { 18 const unsigned Machine; 19 20 protected: 21 MCWinCOFFObjectTargetWriter(unsigned Machine_); 22 23 public: 24 virtual ~MCWinCOFFObjectTargetWriter() {} 25 26 unsigned getMachine() const { return Machine; } 27 virtual unsigned getRelocType(unsigned FixupKind) const = 0; 28 }; 29 30 /// \brief Construct a new Win COFF writer instance. 31 /// 32 /// \param MOTW - The target specific WinCOFF writer subclass. 33 /// \param OS - The stream to write to. 34 /// \returns The constructed object writer. 35 MCObjectWriter *createWinCOFFObjectWriter(MCWinCOFFObjectTargetWriter *MOTW, 36 raw_ostream &OS); 37} // End llvm namespace 38 39#endif 40