14 #ifndef LLVM_BITCODE_BITCODEWRITER_H 15 #define LLVM_BITCODE_BITCODEWRITER_H 28 class BitstreamWriter;
34 std::unique_ptr<BitstreamWriter> Stream;
42 bool WroteStrtab =
false, WroteSymtab =
false;
46 std::vector<Module *> Mods;
91 bool GenerateHash =
false,
ModuleHash *ModHash =
nullptr);
105 const std::map<std::string, GVSummaryMapTy> *ModuleToSummariesForIndex);
130 bool ShouldPreserveUseListOrder =
false,
132 bool GenerateHash =
false,
152 const std::map<std::string, GVSummaryMapTy>
153 *ModuleToSummariesForIndex =
nullptr);
157 #endif // LLVM_BITCODE_BITCODEWRITER_H
void writeIndex(const ModuleSummaryIndex *Index, const std::map< std::string, GVSummaryMapTy > *ModuleToSummariesForIndex)
This class represents lattice values for constants.
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.
void writeThinLinkBitcode(const Module &M, const ModuleSummaryIndex &Index, const ModuleHash &ModHash)
Write the specified thin link bitcode file (i.e., the minimized bitcode file) to the buffer specified...
This file defines the MallocAllocator and BumpPtrAllocator interfaces.
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.
std::array< uint32_t, 5 > ModuleHash
160 bits SHA1
void WriteThinLinkBitcodeToFile(const Module &M, raw_ostream &Out, const ModuleSummaryIndex &Index, const ModuleHash &ModHash)
Write the specified thin link bitcode file (i.e., the minimized bitcode file) to the given raw output...
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...
BitcodeWriter(SmallVectorImpl< char > &Buffer)
Create a BitcodeWriter that writes to Buffer.
Allocate memory in an ever growing pool, as if by bump-pointer.
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.
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.