summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorAmir Ayupov <aaupov@fb.com>2025-06-08 17:43:02 -0700
committerAmir Ayupov <aaupov@fb.com>2025-06-08 17:43:02 -0700
commit68b99df7ad1b910378c8cda5afff637fbe3c0efc (patch)
tree1d2e51419c3f89a0909603d355598c27f1a92d42 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentbbbecc425389aeb7b93d9018b40a95b389c27f40 (diff)
parentc480dcddd91e3ff0707d6629e6ddac8587d9d1f1 (diff)
[𝘀𝗽𝗿] changes introduced through rebaseusers/aaupov/spr/main.bolt-sort-entrydata
Created using spr 1.3.4 [skip ci]
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 47388c232b1a..105edb943eb7 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -8164,6 +8164,14 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
ContextSizes.reserve(NumContextSizeInfoEntries);
for (unsigned J = 0; J < NumContextSizeInfoEntries; J++) {
assert(ContextIdIndex < PendingContextIds.size());
+ // Skip any 0 entries for MIBs without the context size info.
+ if (PendingContextIds[ContextIdIndex] == 0) {
+ // The size should also be 0 if the context was 0.
+ assert(!Record[I]);
+ ContextIdIndex++;
+ I++;
+ continue;
+ }
// PendingContextIds read from the preceding FS_ALLOC_CONTEXT_IDS
// should be in the same order as the total sizes.
ContextSizes.push_back(