[BOLT][NFC] Fix build (#99361)

On clang 14 the build is failing with:
reference to local binding 'ParentName' declared in enclosing function
'llvm::bolt::RewriteInstance::registerFragments'
This commit is contained in:
Vladislav Khmelevsky
2024-07-17 23:17:12 +04:00
committed by GitHub
parent ff0821583e
commit 51122fb446

View File

@@ -1432,7 +1432,9 @@ void RewriteInstance::registerFragments() {
// of the last local symbol.
ELFSymbolRef LocalSymEnd = ELF64LEFile->toSymbolRef(SymTab, SymTab->sh_info);
for (auto &[ParentName, BF] : AmbiguousFragments) {
for (auto &Fragment : AmbiguousFragments) {
const StringRef &ParentName = Fragment.first;
BinaryFunction *BF = Fragment.second;
const uint64_t Address = BF->getAddress();
// Get fragment's own symbol