LLVM 20.0.0git
MCGOFFObjectWriter.h
Go to the documentation of this file.
1//===- MCGOFFObjectWriter.h - GOFF Object Writer ----------------*- C++ -*-===//
2//
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
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_MC_MCGOFFOBJECTWRITER_H
10#define LLVM_MC_MCGOFFOBJECTWRITER_H
11
13
14namespace llvm {
15class MCObjectWriter;
16class raw_pwrite_stream;
17
19protected:
21
22public:
23 virtual ~MCGOFFObjectTargetWriter() = default;
24
25 Triple::ObjectFormatType getFormat() const override { return Triple::GOFF; }
26
27 static bool classof(const MCObjectTargetWriter *W) {
28 return W->getFormat() == Triple::GOFF;
29 }
30};
31
32/// \brief Construct a new GOFF writer instance.
33///
34/// \param MOTW - The target-specific GOFF writer subclass.
35/// \param OS - The stream to write to.
36/// \returns The constructed object writer.
37std::unique_ptr<MCObjectWriter>
38createGOFFObjectWriter(std::unique_ptr<MCGOFFObjectTargetWriter> MOTW,
39 raw_pwrite_stream &OS);
40} // namespace llvm
41
42#endif
raw_pwrite_stream & OS
static bool classof(const MCObjectTargetWriter *W)
virtual ~MCGOFFObjectTargetWriter()=default
Triple::ObjectFormatType getFormat() const override
Base class for classes that define behaviour that is specific to both the target and the object forma...
ObjectFormatType
Definition: Triple.h:307
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
std::unique_ptr< MCObjectWriter > createGOFFObjectWriter(std::unique_ptr< MCGOFFObjectTargetWriter > MOTW, raw_pwrite_stream &OS)
Construct a new GOFF writer instance.