[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)
This commit is contained in:
Maksim Panchenko 2021-09-29 11:40:16 -07:00
parent e3b901aaee
commit ba1f503f1b
1 changed files with 1 additions and 2 deletions

View File

@ -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;