LLVM 24.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"
20#include <memory>
21#include <vector>
22
23namespace llvm {
24
25class BitstreamWriter;
26class Module;
27class raw_ostream;
28
29namespace dxil {
30
32
35 std::unique_ptr<BitstreamWriter> Stream;
36
38
39 void writeBlob(unsigned Block, unsigned Record, StringRef Blob);
40
41 std::vector<Module *> Mods;
42
43public:
44 /// Create a BitcodeWriter that writes to Buffer.
46
48
49 /// Write the specified module to the buffer specified at construction time.
50 void writeModule(const Module &M, const DXILDebugInfoMap &DebugInfo);
51};
52
53/// Write the specified module to the specified raw output stream.
54///
55/// For streams where it matters, the given stream should be in "binary"
56/// mode.
58
59} // namespace dxil
60
61} // namespace llvm
62
63#endif // LLVM_DXILWRITER_DXILBITCODEWRITER_H
ModuleSummaryIndex.h This file contains the declarations the classes that hold the module index and s...
A Module instance is used to store all the information related to an LLVM module.
Definition Module.h:68
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
Utility for building string tables with deduplicated suffixes.
BitcodeWriter(SmallVectorImpl< char > &Buffer)
Create a BitcodeWriter that writes to Buffer.
void writeModule(const Module &M, const DXILDebugInfoMap &DebugInfo)
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:53
void WriteDXILToFile(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.