Skip to content

Commit dbf7910

Browse files
yota9yuxuanchen1997
authored andcommitted
[BOLT][NFC] Fix build (#99361)
Summary: On clang 14 the build is failing with: reference to local binding 'ParentName' declared in enclosing function 'llvm::bolt::RewriteInstance::registerFragments' Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60250860
1 parent eeb76f1 commit dbf7910

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)