LLVM 20.0.0git
DXILBitcodeWriter.h
Go to the documentation of this file.
1//===- Bitcode/Writer/DXILBitcodeWriter.cpp - DXIL Bitcode Writer ---------===//
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// Bitcode writer implementation.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_DXILWRITER_DXILBITCODEWRITER_H
14#define LLVM_DXILWRITER_DXILBITCODEWRITER_H
15
16#include "llvm/ADT/StringRef.h"
21#include <map>
22#include <memory>
23#include <string>
24#include <vector>
25
26namespace llvm {
27
28class BitstreamWriter;
29class Module;
30class raw_ostream;
31
32namespace dxil {
33
36 std::unique_ptr<BitstreamWriter> Stream;
37
39
40 // Owns any strings created by the irsymtab writer until we create the
41 // string table.
42 BumpPtrAllocator Alloc;
43
44 void writeBlob(unsigned Block, unsigned Record, StringRef Blob);
45
46 std::vector<Module *> Mods;
47
48public:
49 /// Create a BitcodeWriter that writes to Buffer.
51
53
54 /// Write the specified module to the buffer specified at construction time.
55 void writeModule(const Module &M);
56};
57
58/// Write the specified module to the specified raw output stream.
59///
60/// For streams where it matters, the given stream should be in "binary"
61/// mode.
62void WriteDXILToFile(const Module &M, raw_ostream &Out);
63
64} // namespace dxil
65
66} // namespace llvm
67
68#endif // LLVM_DXILWRITER_DXILBITCODEWRITER_H
This file defines the BumpPtrAllocator interface.
Machine Check Debug Module
ModuleSummaryIndex.h This file contains the declarations the classes that hold the module index and s...
Allocate memory in an ever growing pool, as if by bump-pointer.
Definition: Allocator.h:66
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: SmallVector.h:573
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:51
Utility for building string tables with deduplicated suffixes.
void writeModule(const Module &M)
Write the specified module to the buffer specified at construction time.
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
void WriteDXILToFile(const Module &M, raw_ostream &Out)
Write the specified module to the specified raw output stream.
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18