summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorAndrew Browne <browneee@google.com>2019-11-18 15:04:56 -0800
committerTeresa Johnson <tejohnson@google.com>2019-11-18 16:04:09 -0800
commit6a1b51282bc5728b77a80581a4aa38edcc9f95e5 (patch)
tree200de7c3d35e3f76202a0cce9528a0281adad141 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentf19ea6ea5f8c0a05bf7638dad857c70f9236b6e8 (diff)
downloadbcm5719-llvm-6a1b51282bc5728b77a80581a4aa38edcc9f95e5.tar.gz
bcm5719-llvm-6a1b51282bc5728b77a80581a4aa38edcc9f95e5.zip
Fix error message missed in commit dde589389fcb8b5098f7a47f1b781b27d29a0cac.
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
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index b99ade6a785..3a56c1aa93b 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -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
OpenPOWER on IntegriCloud