1 //===-- llvm/MC/MCXCOFFObjectWriter.h - XCOFF Object Writer ---------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_MC_MCXCOFFOBJECTWRITER_H
10 #define LLVM_MC_MCXCOFFOBJECTWRITER_H
12 #include "llvm/MC/MCObjectWriter.h"
16 class raw_pwrite_stream
;
18 class MCXCOFFObjectTargetWriter
: public MCObjectTargetWriter
{
20 MCXCOFFObjectTargetWriter(bool Is64Bit
);
23 ~MCXCOFFObjectTargetWriter() override
;
25 Triple::ObjectFormatType
getFormat() const override
{ return Triple::XCOFF
; }
26 static bool classof(const MCObjectTargetWriter
*W
) {
27 return W
->getFormat() == Triple::XCOFF
;
29 bool is64Bit() const { return Is64Bit
; }
35 std::unique_ptr
<MCObjectWriter
>
36 createXCOFFObjectWriter(std::unique_ptr
<MCXCOFFObjectTargetWriter
> MOTW
,
37 raw_pwrite_stream
&OS
);
39 } // end namespace llvm
41 #endif // LLVM_MC_MCXCOFFOBJECTWRITER_H