LLVM  15.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"
13 #include "llvm/MC/MCObjectWriter.h"
14 
15 namespace llvm {
16 
17 class raw_pwrite_stream;
18 
20 protected:
22 
23 public:
25 
27  return Triple::DXContainer;
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.
39 std::unique_ptr<MCObjectWriter>
40 createDXContainerObjectWriter(std::unique_ptr<MCDXContainerTargetWriter> MOTW,
41  raw_pwrite_stream &OS);
42 
43 } // end namespace llvm
44 
45 #endif // LLVM_MC_MCDXCONTAINERWRITER_H
llvm::Triple::DXContainer
@ DXContainer
Definition: Triple.h:273
llvm::MCDXContainerTargetWriter
Definition: MCDXContainerWriter.h:19
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::createDXContainerObjectWriter
std::unique_ptr< MCObjectWriter > createDXContainerObjectWriter(std::unique_ptr< MCDXContainerTargetWriter > MOTW, raw_pwrite_stream &OS)
Construct a new DXContainer writer instance.
Definition: MCDXContainerWriter.cpp:140
llvm::RISCVFenceField::W
@ W
Definition: RISCVBaseInfo.h:242
llvm::MCDXContainerTargetWriter::getFormat
Triple::ObjectFormatType getFormat() const override
Definition: MCDXContainerWriter.h:26
llvm::MCObjectTargetWriter
Base class for classes that define behaviour that is specific to both the target and the object forma...
Definition: MCObjectWriter.h:120
llvm::MCDXContainerTargetWriter::classof
static bool classof(const MCObjectTargetWriter *W)
Definition: MCDXContainerWriter.h:29
Triple.h
llvm::MCDXContainerTargetWriter::~MCDXContainerTargetWriter
virtual ~MCDXContainerTargetWriter()
Definition: MCDXContainerWriter.cpp:21
llvm::Triple::ObjectFormatType
ObjectFormatType
Definition: Triple.h:269
MCObjectWriter.h
llvm::MCDXContainerTargetWriter::MCDXContainerTargetWriter
MCDXContainerTargetWriter()
Definition: MCDXContainerWriter.h:21