summaryrefslogtreecommitdiff
path: root/include/llvm/Bitcode/BitcodeReader.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-05-02 18:30:13 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-05-02 18:30:13 +0000
commita303c417bbdb53703c2c17398b08486bde78f1f6 (patch)
tree98366d6b93d863cefdc53f16c66c0c5ae7fb2261 /include/llvm/Bitcode/BitcodeReader.h
parent12f3ca4cdb95b193af905a00e722a4dcb40b3de3 (diff)
Notes
Diffstat (limited to 'include/llvm/Bitcode/BitcodeReader.h')
-rw-r--r--include/llvm/Bitcode/BitcodeReader.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/llvm/Bitcode/BitcodeReader.h b/include/llvm/Bitcode/BitcodeReader.h
index 0701ddbb7f1c..54f990d00233 100644
--- a/include/llvm/Bitcode/BitcodeReader.h
+++ b/include/llvm/Bitcode/BitcodeReader.h
@@ -93,6 +93,10 @@ namespace llvm {
/// Parse the specified bitcode buffer, returning the module summary index.
Expected<std::unique_ptr<ModuleSummaryIndex>> getSummary();
+
+ /// Parse the specified bitcode buffer and merge its module summary index
+ /// into CombinedIndex.
+ Error readSummary(ModuleSummaryIndex &CombinedIndex, unsigned ModuleId);
};
/// Returns a list of modules in the specified bitcode buffer.
@@ -141,6 +145,18 @@ namespace llvm {
Expected<std::unique_ptr<ModuleSummaryIndex>>
getModuleSummaryIndex(MemoryBufferRef Buffer);
+ /// Parse the specified bitcode buffer and merge the index into CombinedIndex.
+ Error readModuleSummaryIndex(MemoryBufferRef Buffer,
+ ModuleSummaryIndex &CombinedIndex,
+ unsigned ModuleId);
+
+ /// Parse the module summary index out of an IR file and return the module
+ /// summary index object if found, or an empty summary if not. If Path refers
+ /// to an empty file and the -ignore-empty-index-file cl::opt flag is passed
+ /// this function will return nullptr.
+ Expected<std::unique_ptr<ModuleSummaryIndex>>
+ getModuleSummaryIndexForFile(StringRef Path);
+
/// isBitcodeWrapper - Return true if the given bytes are the magic bytes
/// for an LLVM IR bitcode wrapper.
///