Skip to content

Commit 64e94fd

Browse files
committed
git clangformat
1 parent 1ae74d5 commit 64e94fd

File tree

6 files changed

+754
-772
lines changed

6 files changed

+754
-772
lines changed

bolt/lib/Core/Relocation.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ static size_t getSizeForTypeRISCV(uint32_t Type) {
236236
case ELF::R_RISCV_GOT_HI20:
237237
case ELF::R_RISCV_TLS_GOT_HI20:
238238
case ELF::R_RISCV_TLS_GD_HI20:
239-
// See extractValueRISCV for why this is necessary.
240-
return 8;
239+
// See extractValueRISCV for why this is necessary.
240+
return 8;
241241
}
242242
}
243243

@@ -471,12 +471,11 @@ static uint64_t extractValueRISCV(uint32_t Type, uint64_t Contents,
471471
case ELF::R_RISCV_GOT_HI20:
472472
case ELF::R_RISCV_TLS_GOT_HI20:
473473
case ELF::R_RISCV_TLS_GD_HI20:
474-
// We need to know the exact address of the GOT entry so we extract the
475-
// value from both the AUIPC and L[D|W]. We cannot rely on the symbol in the
476-
// relocation for this since it simply refers to the object that is stored
477-
// in the GOT entry, not to the entry itself.
478-
return extractUImmRISCV(Contents & 0xffffffff) +
479-
extractIImmRISCV(Contents >> 32);
474+
// We need to know the exact address of the GOT entry so we extract the
475+
// value from both the AUIPC and L[D|W]. We cannot rely on the symbol in the
476+
// relocation for this since it simply refers to the object that is stored
477+
// in the GOT entry, not to the entry itself.
478+
return extractUImmRISCV(Contents & 0xffffffff) + extractIImmRISCV(Contents >> 32);
480479
case ELF::R_RISCV_PCREL_HI20:
481480
case ELF::R_RISCV_HI20:
482481
return extractUImmRISCV(Contents);
@@ -687,7 +686,7 @@ static bool isPCRelativeRISCV(uint32_t Type) {
687686
case ELF::R_RISCV_32_PCREL:
688687
case ELF::R_RISCV_TLS_GOT_HI20:
689688
case ELF::R_RISCV_TLS_GD_HI20:
690-
return true;
689+
return true;
691690
}
692691
}
693692

bolt/lib/Rewrite/RewriteInstance.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2901,12 +2901,10 @@ void RewriteInstance::handleRelocation(const SectionRef &RelocatedSection,
29012901
// of sections and whose symbol address is not really what should be
29022902
// encoded in the instruction). So we essentially disabled this check
29032903
// for AArch64 and live with bogus names for objects.
2904-
assert((IsAArch64 || BC->isRISCV() || IsSectionRelocation ||
2905-
BD->nameStartsWith(SymbolName) ||
2904+
assert((IsAArch64 || BC->isRISCV() || IsSectionRelocation || BD->nameStartsWith(SymbolName) ||
29062905
BD->nameStartsWith("PG" + SymbolName) ||
29072906
(BD->nameStartsWith("ANONYMOUS") &&
2908-
(BD->getSectionName().starts_with(".plt") ||
2909-
BD->getSectionName().ends_with(".plt")))) &&
2907+
(BD->getSectionName().starts_with(".plt") || BD->getSectionName().ends_with(".plt")))) &&
29102908
"BOLT symbol names of all non-section relocations must match up "
29112909
"with symbol names referenced in the relocation");
29122910

0 commit comments

Comments
 (0)