aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.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/Writer/BitcodeWriter.cpp
parentf19ea6ea5f8c0a05bf7638dad857c70f9236b6e8 (diff)
downloadllvm-6a1b51282bc5728b77a80581a4aa38edcc9f95e5.zip
llvm-6a1b51282bc5728b77a80581a4aa38edcc9f95e5.tar.gz
llvm-6a1b51282bc5728b77a80581a4aa38edcc9f95e5.tar.bz2
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/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 6defe3a..fca2cc2 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -3725,11 +3725,6 @@ void ModuleBitcodeWriterBase::writeModuleLevelReferences(
NameVals.clear();
}
-// Current version for the summary.
-// This is bumped whenever we introduce changes in the way some record are
-// interpreted, like flags for instance.
-static const uint64_t INDEX_VERSION = 8;
-
/// Emit the per-module summary section alongside the rest of
/// the module's bitcode.
void ModuleBitcodeWriterBase::writePerModuleGlobalValueSummary() {
@@ -3743,7 +3738,9 @@ void ModuleBitcodeWriterBase::writePerModuleGlobalValueSummary() {
: bitc::FULL_LTO_GLOBALVAL_SUMMARY_BLOCK_ID,
4);
- Stream.EmitRecord(bitc::FS_VERSION, ArrayRef<uint64_t>{INDEX_VERSION});
+ Stream.EmitRecord(
+ bitc::FS_VERSION,
+ ArrayRef<uint64_t>{ModuleSummaryIndex::BitcodeSummaryVersion});
// Write the index flags.
uint64_t Flags = 0;
@@ -3890,7 +3887,9 @@ void ModuleBitcodeWriterBase::writePerModuleGlobalValueSummary() {
/// Emit the combined summary section into the combined index file.
void IndexBitcodeWriter::writeCombinedGlobalValueSummary() {
Stream.EnterSubblock(bitc::GLOBALVAL_SUMMARY_BLOCK_ID, 3);
- Stream.EmitRecord(bitc::FS_VERSION, ArrayRef<uint64_t>{INDEX_VERSION});
+ Stream.EmitRecord(
+ bitc::FS_VERSION,
+ ArrayRef<uint64_t>{ModuleSummaryIndex::BitcodeSummaryVersion});
// Write the index flags.
uint64_t Flags = 0;