LLVM 17.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#include "llvm/ADT/StringRef.h"
18#include <map>
19#include <memory>
20#include <string>
21#include <vector>
22
23namespace llvm {
24
25class BitstreamWriter;
26class Module;
27class raw_ostream;
28
29namespace dxil {
30
33 std::unique_ptr<BitstreamWriter> Stream;
34
36
37 // Owns any strings created by the irsymtab writer until we create the
38 // string table.
39 BumpPtrAllocator Alloc;
40
41 void writeBlob(unsigned Block, unsigned Record, StringRef Blob);
42
43 std::vector<Module *> Mods;
44
45public:
46 /// Create a BitcodeWriter that writes to Buffer.
48
50
51 /// Write the specified module to the buffer specified at construction time.
52 void writeModule(const Module &M);
53};
54
55/// Write the specified module to the specified raw output stream.
56///
57/// For streams where it matters, the given stream should be in "binary"
58/// mode.
59void WriteDXILToFile(const Module &M, raw_ostream &Out);
60
61} // namespace dxil
62
63} // namespace llvm
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:577
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
Utility for building string tables with deduplicated suffixes.
void writeModule(const Module &M)
Write the specified module to the buffer specified at construction time.
A raw_ostream of a file for reading/writing/seeking.
Definition: raw_ostream.h:611
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