summaryrefslogtreecommitdiff
path: root/include/llvm/Bitcode/BitcodeWriter.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Bitcode/BitcodeWriter.h')
-rw-r--r--include/llvm/Bitcode/BitcodeWriter.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/llvm/Bitcode/BitcodeWriter.h b/include/llvm/Bitcode/BitcodeWriter.h
index f8b7fb341e8..197a35703bf 100644
--- a/include/llvm/Bitcode/BitcodeWriter.h
+++ b/include/llvm/Bitcode/BitcodeWriter.h
@@ -84,6 +84,16 @@ namespace llvm {
const ModuleSummaryIndex *Index = nullptr,
bool GenerateHash = false, ModuleHash *ModHash = nullptr);
+ /// Write the specified thin link bitcode file (i.e., the minimized bitcode
+ /// file) to the buffer specified at construction time. The thin link
+ /// bitcode file is used for thin link, and it only contains the necessary
+ /// information for thin link.
+ ///
+ /// ModHash is for use in ThinLTO incremental build, generated while the
+ /// IR bitcode file writing.
+ void writeThinLinkBitcode(const Module *M, const ModuleSummaryIndex &Index,
+ const ModuleHash &ModHash);
+
void writeIndex(
const ModuleSummaryIndex *Index,
const std::map<std::string, GVSummaryMapTy> *ModuleToSummariesForIndex);
@@ -116,6 +126,17 @@ namespace llvm {
bool GenerateHash = false,
ModuleHash *ModHash = nullptr);
+ /// Write the specified thin link bitcode file (i.e., the minimized bitcode
+ /// file) to the given raw output stream, where it will be written in a new
+ /// bitcode block. The thin link bitcode file is used for thin link, and it
+ /// only contains the necessary information for thin link.
+ ///
+ /// ModHash is for use in ThinLTO incremental build, generated while the IR
+ /// bitcode file writing.
+ void WriteThinLinkBitcodeToFile(const Module *M, raw_ostream &Out,
+ const ModuleSummaryIndex &Index,
+ const ModuleHash &ModHash);
+
/// Write the specified module summary index to the given raw output stream,
/// where it will be written in a new bitcode block. This is used when
/// writing the combined index file for ThinLTO. When writing a subset of the