LLVM  15.0.0git
Public Member Functions | List of all members
llvm::dxil::BitcodeWriter Class Reference

#include "Target/DirectX/DXILWriter/DXILBitcodeWriter.h"

Public Member Functions

 BitcodeWriter (SmallVectorImpl< char > &Buffer, raw_fd_stream *FS=nullptr)
 Create a BitcodeWriter that writes to Buffer. More...
 
 ~BitcodeWriter ()
 
void writeSymtab ()
 Attempt to write a symbol table to the bitcode file. More...
 
void writeStrtab ()
 Write the bitcode file's string table. More...
 
void copyStrtab (StringRef Strtab)
 Copy the string table for another module into this bitcode file. More...
 
void writeModule (const Module &M)
 Write the specified module to the buffer specified at construction time. More...
 

Detailed Description

Definition at line 31 of file DXILBitcodeWriter.h.

Constructor & Destructor Documentation

◆ BitcodeWriter()

dxil::BitcodeWriter::BitcodeWriter ( SmallVectorImpl< char > &  Buffer,
raw_fd_stream FS = nullptr 
)

Create a BitcodeWriter that writes to Buffer.

Begin dxil::BitcodeWriter Implementation.

Definition at line 361 of file DXILBitcodeWriter.cpp.

◆ ~BitcodeWriter()

dxil::BitcodeWriter::~BitcodeWriter ( )

Definition at line 373 of file DXILBitcodeWriter.cpp.

References assert().

Member Function Documentation

◆ copyStrtab()

void llvm::dxil::BitcodeWriter::copyStrtab ( StringRef  Strtab)

Copy the string table for another module into this bitcode file.

This should be called after copying the module itself into the bitcode file.

◆ writeModule()

void BitcodeWriter::writeModule ( const Module M)

Write the specified module to the buffer specified at construction time.

Definition at line 454 of file DXILBitcodeWriter.cpp.

References assert(), M, and llvm::dxil::DXILBitcodeWriter::write().

Referenced by llvm::dxil::WriteDXILToFile().

◆ writeStrtab()

void llvm::dxil::BitcodeWriter::writeStrtab ( )

Write the bitcode file's string table.

This must be called exactly once after all modules and the optional symbol table have been written.

Referenced by llvm::dxil::WriteDXILToFile().

◆ writeSymtab()

void llvm::dxil::BitcodeWriter::writeSymtab ( )

Attempt to write a symbol table to the bitcode file.

This must be called at most once after all modules have been written.

A reader does not require a symbol table to interpret a bitcode file; the symbol table is needed only to improve link-time performance. So this function may decide not to write a symbol table. It may so decide if, for example, the target is unregistered or the IR is malformed.

Referenced by llvm::dxil::WriteDXILToFile().


The documentation for this class was generated from the following files: