Skip to content

Commit 51122fb

Browse files
authored
[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'
1 parent ff08215 commit 51122fb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bolt/lib/Rewrite/RewriteInstance.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1432,7 +1432,9 @@ void RewriteInstance::registerFragments() {
14321432
// of the last local symbol.
14331433
ELFSymbolRef LocalSymEnd = ELF64LEFile->toSymbolRef(SymTab, SymTab->sh_info);
14341434

1435-
for (auto &[ParentName, BF] : AmbiguousFragments) {
1435+
for (auto &Fragment : AmbiguousFragments) {
1436+
const StringRef &ParentName = Fragment.first;
1437+
BinaryFunction *BF = Fragment.second;
14361438
const uint64_t Address = BF->getAddress();
14371439

14381440
// Get fragment's own symbol

0 commit comments

Comments
 (0)