From ba1f503f1b8f3f92b2ac4c0962bbdab1314dda7f Mon Sep 17 00:00:00 2001 From: Maksim Panchenko Date: Wed, 29 Sep 2021 11:40:16 -0700 Subject: [PATCH] [BOLT][NFC] Remove redundant code Summary: For historical reasons, we are populating FailedAddresses twice in RewriteInstance. Remove the second (happening later) call to avoid the confusion. (cherry picked from FBD31278956) --- bolt/src/RewriteInstance.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bolt/src/RewriteInstance.cpp b/bolt/src/RewriteInstance.cpp index 941de8903ced..550c9a0b8643 100644 --- a/bolt/src/RewriteInstance.cpp +++ b/bolt/src/RewriteInstance.cpp @@ -5159,9 +5159,8 @@ void RewriteInstance::rewriteFile() { << Twine::utohexstr(Function->getMaxSize()) << ") for function " << *Function << '\n'; } - FailedAddresses.emplace_back(Function->getAddress()); // Remove jump table sections that this function owns in non-reloc mode - // because we don't wnat to write them anymore + // because we don't want to write them anymore. if (!BC->HasRelocations && opts::JumpTables == JTS_BASIC) { for (auto &JTI : Function->JumpTables) { JumpTable *JT = JTI.second;