Fix error message missed in commit dde589389f.

Patch by Andrew Browne <browneee@google.com>

Reviewers: tejohnson, evgeny777

Reviewed By: tejohnson

Subscribers: arphaman, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70195
This commit is contained in:
Andrew Browne authored and Teresa Johnson committed 2019-11-18 16:04:09 -08:00
1 parent f19ea6ea5f
commit 6a1b51282b
4 files changed
+19 -9

No files matched your search

+4 -2
View File
@@ -5778,9 +5778,11 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
}
const uint64_t Version = Record[0];
const bool IsOldProfileFormat = Version == 1;
if (Version < 1 || Version > 8)
if (Version < 1 || Version > ModuleSummaryIndex::BitcodeSummaryVersion)
return error("Invalid summary version " + Twine(Version) +
". Version should be in the range [1-7].");
". Version should be in the range [1-" +
Twine(ModuleSummaryIndex::BitcodeSummaryVersion) +
"].");
Record.clear();
// Keep around the last seen summary to be used when we see an optional