[llvm] [LTO] Fix a unused variable error (PR #107660)
Mingming Liu via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 6 17:18:08 PDT 2024
https://github.com/minglotus-6 created https://github.com/llvm/llvm-project/pull/107660
Fix unused `EntryCount` error in https://lab.llvm.org/buildbot/#/builders/66/builds/3610 and https://lab.llvm.org/buildbot/#/builders/168/builds/3029
>From 05d5fe618853fe2cfdba1d988f4f77ecd7bfb136 Mon Sep 17 00:00:00 2001
From: mingmingl <mingmingl at google.com>
Date: Fri, 6 Sep 2024 17:16:22 -0700
Subject: [PATCH] Fix a unused variable error
---
llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 250ba425a5d591..9eafb90dae7663 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -7792,7 +7792,6 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
uint64_t RawFlags = Record[2];
unsigned InstCount = Record[3];
uint64_t RawFunFlags = 0;
- uint64_t EntryCount = 0;
unsigned NumRefs = Record[4];
unsigned NumRORefs = 0, NumWORefs = 0;
int RefListStartIndex = 5;
@@ -7806,7 +7805,8 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
RefListStartIndex = 7;
if (Version >= 6) {
NumRefsIndex = 6;
- EntryCount = Record[5];
+ // Record[5] is reserved for an obsolete field. Bitcode writer
+ // writes a dummy zero.
RefListStartIndex = 8;
if (Version >= 7) {
RefListStartIndex = 9;
More information about the llvm-commits
mailing list