LLVM 22.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
13#include "llvm/MC/MCValue.h"
16
17namespace llvm {
18
20
22protected:
24
25public:
27
30 }
31 static bool classof(const MCObjectTargetWriter *W) {
32 return W->getFormat() == Triple::DXContainer;
33 }
34};
35
38 std::unique_ptr<MCDXContainerTargetWriter> TargetObjectWriter;
39
40public:
41 DXContainerObjectWriter(std::unique_ptr<MCDXContainerTargetWriter> MOTW,
43 : W(OS, llvm::endianness::little), TargetObjectWriter(std::move(MOTW)) {}
44
45 uint64_t writeObject() override;
46};
47} // end namespace llvm
48
49#endif // LLVM_MC_MCDXCONTAINERWRITER_H
DXContainerObjectWriter(std::unique_ptr< MCDXContainerTargetWriter > MOTW, raw_pwrite_stream &OS)
uint64_t writeObject() override
Write the object file and returns the number of bytes written.
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...
MCObjectWriter()=default
An abstract base class for streams implementations that also support a pwrite operation.
This is an optimization pass for GlobalISel generic memory operations.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Definition STLExtras.h:1847
endianness
Definition bit.h:71
Implement std::hash so that hash_code can be used in STL containers.
Definition BitVector.h:870
Adapter to write values to a stream in a particular byte order.