LLVM 17.0.0git
MCDXContainerWriter.h
Go to the documentation of this file.
1//===- llvm/MC/MCDXContainerWriter.h - DXContainer 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_MCDXCONTAINERWRITER_H
10#define LLVM_MC_MCDXCONTAINERWRITER_H
11
12#include "llvm/ADT/Triple.h"
14
15namespace llvm {
16
17class raw_pwrite_stream;
18
20protected:
22
23public:
25
28 }
29 static bool classof(const MCObjectTargetWriter *W) {
30 return W->getFormat() == Triple::DXContainer;
31 }
32};
33
34/// Construct a new DXContainer writer instance.
35///
36/// \param MOTW - The target specific DXContainer writer subclass.
37/// \param OS - The stream to write to.
38/// \returns The constructed object writer.
39std::unique_ptr<MCObjectWriter>
40createDXContainerObjectWriter(std::unique_ptr<MCDXContainerTargetWriter> MOTW,
41 raw_pwrite_stream &OS);
42
43} // end namespace llvm
44
45#endif // LLVM_MC_MCDXCONTAINERWRITER_H
This header is deprecated in favour of llvm/TargetParser/Triple.h.
Triple::ObjectFormatType getFormat() const override
static bool classof(const MCObjectTargetWriter *W)
Base class for classes that define behaviour that is specific to both the target and the object forma...
ObjectFormatType
Definition: Triple.h:279
@ DXContainer
Definition: Triple.h:283
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
std::unique_ptr< MCObjectWriter > createDXContainerObjectWriter(std::unique_ptr< MCDXContainerTargetWriter > MOTW, raw_pwrite_stream &OS)
Construct a new DXContainer writer instance.