diff options
Diffstat (limited to 'include/llvm/Bitcode/BitcodeReader.h')
-rw-r--r-- | include/llvm/Bitcode/BitcodeReader.h | 16 |
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. /// |