Skip to content

Commit 29cc466

Browse files
author
Alexander Yermolovich
committed
moved code around
1 parent 429075e commit 29cc466

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bolt/lib/Passes/IdenticalCodeFolding.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,14 +365,14 @@ void IdenticalCodeFolding::processDataRelocations(
365365

366366
Error IdenticalCodeFolding::markFunctionsUnsafeToFold(BinaryContext &BC) {
367367
Error ErrorStatus = Error::success();
368-
ErrorOr<BinarySection &> SecRelData = BC.getUniqueSectionByName(".rela.data");
369368
if (!BC.HasRelocations)
370369
ErrorStatus = joinErrors(
371370
std::move(ErrorStatus),
372371
createFatalBOLTError(Twine("BOLT-ERROR: Binary built without "
373372
"relocations. Safe ICF is not supported")));
374373
if (ErrorStatus)
375374
return ErrorStatus;
375+
ErrorOr<BinarySection &> SecRelData = BC.getUniqueSectionByName(".rela.data");
376376
if (SecRelData) {
377377
SectionRef SecRefRelData = SecRelData->getSectionRef();
378378
processDataRelocations(BC, SecRefRelData);

0 commit comments

Comments
 (0)