14 #ifndef LLVM_BITCODE_BITCODEWRITER_H
15 #define LLVM_BITCODE_BITCODEWRITER_H
22 class BitstreamWriter;
28 std::unique_ptr<BitstreamWriter> Stream;
36 bool WroteStrtab =
false, WroteSymtab =
false;
40 std::vector<Module *> Mods;
85 bool GenerateHash =
false,
ModuleHash *ModHash =
nullptr);
89 const std::map<std::string, GVSummaryMapTy> *ModuleToSummariesForIndex);
114 bool ShouldPreserveUseListOrder =
false,
116 bool GenerateHash =
false,
125 const std::map<std::string, GVSummaryMapTy>
126 *ModuleToSummariesForIndex =
nullptr);
void writeIndex(const ModuleSummaryIndex *Index, const std::map< std::string, GVSummaryMapTy > *ModuleToSummariesForIndex)
A Module instance is used to store all the information related to an LLVM module. ...
void writeSymtab()
Attempt to write a symbol table to the bitcode file.
std::array< uint32_t, 5 > ModuleHash
160 bits SHA1
Utility for building string tables with deduplicated suffixes.
Class to hold module path string table and global value map, and encapsulate methods for operating on...
void WriteBitcodeToFile(const Module *M, raw_ostream &Out, bool ShouldPreserveUseListOrder=false, const ModuleSummaryIndex *Index=nullptr, bool GenerateHash=false, ModuleHash *ModHash=nullptr)
Write the specified module to the specified raw output stream.
BitcodeWriter(SmallVectorImpl< char > &Buffer)
Create a BitcodeWriter that writes to Buffer.
Allocate memory in an ever growing pool, as if by bump-pointer.
void writeModule(const Module *M, bool ShouldPreserveUseListOrder=false, const ModuleSummaryIndex *Index=nullptr, bool GenerateHash=false, ModuleHash *ModHash=nullptr)
Write the specified module to the buffer specified at construction time.
void WriteIndexToFile(const ModuleSummaryIndex &Index, raw_ostream &Out, const std::map< std::string, GVSummaryMapTy > *ModuleToSummariesForIndex=nullptr)
Write the specified module summary index to the given raw output stream, where it will be written in ...
void copyStrtab(StringRef Strtab)
Copy the string table for another module into this bitcode file.
ModuleSummaryIndex.h This file contains the declarations the classes that hold the module index and s...
This class implements an extremely fast bulk output stream that can only output to a stream...
StringRef - Represent a constant reference to a string, i.e.
void writeStrtab()
Write the bitcode file's string table.