Skip to content

Commit 9ec0b30

Browse files
committed
fixup! remove non-NFC parts
1 parent f3565f7 commit 9ec0b30

File tree

3 files changed

+4
-66
lines changed

3 files changed

+4
-66
lines changed

lld/MachO/LinkerOptimizationHints.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,9 @@ static void applyAdrpLdrGotLdr(uint8_t *buf, const ConcatInputSection *isec,
351351
return;
352352
if (ldr3.baseRegister != ldr2.destRegister)
353353
return;
354+
// Loads from the GOT must be pointer sized.
355+
if (ldr2.p2Size != 3 || ldr2.isFloat)
356+
return;
354357
applyAdrpLdr(buf, isec, offset1, offset2);
355358
}
356359
}

lld/MachO/Writer.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,8 +1210,7 @@ void Writer::writeSections() {
12101210
}
12111211

12121212
void Writer::applyOptimizationHints() {
1213-
if (!is_contained({AK_arm64, AK_arm64e, AK_arm64_32}, config->arch()) ||
1214-
config->ignoreOptimizationHints)
1213+
if (config->arch() != AK_arm64 || config->ignoreOptimizationHints)
12151214
return;
12161215

12171216
uint8_t *buf = buffer->getBufferStart();

lld/test/MachO/loh-arm64-32.s

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)