Skip to content

Commit 77e4df9

Browse files
author
git apple-llvm automerger
committed
Merge commit '4dd20b072822' from llvm.org/main into next
2 parents 3ea0958 + 4dd20b0 commit 77e4df9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

bolt/lib/Rewrite/RewriteInstance.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2306,9 +2306,13 @@ void RewriteInstance::processRelocations() {
23062306
return;
23072307

23082308
for (const SectionRef &Section : InputFile->sections()) {
2309-
if (cantFail(Section.getRelocatedSection()) != InputFile->section_end() &&
2310-
!BinarySection(*BC, Section).isAllocatable())
2311-
readRelocations(Section);
2309+
section_iterator SecIter = cantFail(Section.getRelocatedSection());
2310+
if (SecIter == InputFile->section_end())
2311+
continue;
2312+
if (BinarySection(*BC, Section).isAllocatable())
2313+
continue;
2314+
2315+
readRelocations(Section);
23122316
}
23132317

23142318
if (NumFailedRelocations)

0 commit comments

Comments
 (0)