LLVM 22.0.0git
DXContainerObject.h
Go to the documentation of this file.
1//===- DXContainerObject.h --------------------------------------*- 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_LIB_OBJCOPY_DXCONTAINER_DXCONTAINEROBJECT_H
10#define LLVM_LIB_OBJCOPY_DXCONTAINER_DXCONTAINEROBJECT_H
11
12#include "llvm/ADT/ArrayRef.h"
13#include "llvm/ADT/StringRef.h"
15#include <vector>
16
17namespace llvm {
18namespace objcopy {
19namespace dxbc {
20
21using namespace object;
22
23struct Part {
26
27 size_t size() const {
28 return sizeof(::llvm::dxbc::PartHeader) // base header
29 + Data.size(); // contents size
30 }
31};
32
34
35struct Object {
38
39 size_t headerSize() const {
40 return sizeof(::llvm::dxbc::Header) // base header
41 + sizeof(uint32_t) * Parts.size(); // part offset values
42 }
43
45 void recomputeHeader();
46};
47
48} // end namespace dxbc
49} // end namespace objcopy
50} // end namespace llvm
51
52#endif // LLVM_LIB_OBJCOPY_DXCONTAINER_DXCONTAINEROBJECT_H
ReachingDefAnalysis InstSet & ToRemove
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: ArrayRef.h:41
size_t size() const
size - Get the array size.
Definition: ArrayRef.h:147
Lightweight error class with error context and mandatory checking.
Definition: Error.h:159
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1197
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:55
An efficient, type-erasing, non-owning reference to a callable.
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
Use this type to describe the size and type of a DXIL container part.
Definition: DXContainer.h:99
Error removeParts(PartPred ToRemove)
::llvm::dxbc::Header Header
ArrayRef< uint8_t > Data