summaryrefslogtreecommitdiff
path: root/include/llvm/Bitcode
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Bitcode')
-rw-r--r--include/llvm/Bitcode/BitcodeReader.h13
-rw-r--r--include/llvm/Bitcode/LLVMBitCodes.h2
2 files changed, 13 insertions, 2 deletions
diff --git a/include/llvm/Bitcode/BitcodeReader.h b/include/llvm/Bitcode/BitcodeReader.h
index 31ffb7645f3a..61e4f6351b19 100644
--- a/include/llvm/Bitcode/BitcodeReader.h
+++ b/include/llvm/Bitcode/BitcodeReader.h
@@ -40,6 +40,8 @@ namespace llvm {
return std::move(*Val);
}
+ struct BitcodeFileContents;
+
/// Represents a module in a bitcode file.
class BitcodeModule {
// This covers the identification (if present) and module blocks.
@@ -61,8 +63,8 @@ namespace llvm {
IdentificationBit(IdentificationBit), ModuleBit(ModuleBit) {}
// Calls the ctor.
- friend Expected<std::vector<BitcodeModule>>
- getBitcodeModuleList(MemoryBufferRef Buffer);
+ friend Expected<BitcodeFileContents>
+ getBitcodeFileContents(MemoryBufferRef Buffer);
Expected<std::unique_ptr<Module>> getModuleImpl(LLVMContext &Context,
bool MaterializeAll,
@@ -99,6 +101,13 @@ namespace llvm {
Error readSummary(ModuleSummaryIndex &CombinedIndex, unsigned ModuleId);
};
+ struct BitcodeFileContents {
+ std::vector<BitcodeModule> Mods;
+ };
+
+ /// Returns the contents of a bitcode file.
+ Expected<BitcodeFileContents> getBitcodeFileContents(MemoryBufferRef Buffer);
+
/// Returns a list of modules in the specified bitcode buffer.
Expected<std::vector<BitcodeModule>>
getBitcodeModuleList(MemoryBufferRef Buffer);
diff --git a/include/llvm/Bitcode/LLVMBitCodes.h b/include/llvm/Bitcode/LLVMBitCodes.h
index 8ee1e4b583b6..a643bfd1dcea 100644
--- a/include/llvm/Bitcode/LLVMBitCodes.h
+++ b/include/llvm/Bitcode/LLVMBitCodes.h
@@ -55,6 +55,8 @@ enum BlockIDs {
METADATA_KIND_BLOCK_ID,
STRTAB_BLOCK_ID,
+
+ FULL_LTO_GLOBALVAL_SUMMARY_BLOCK_ID,
};
/// Identification block contains a string that describes the producer details,