Skip to content

Commit 8440ced

Browse files
committed
[ELF] Change a Fatal to assert in addThunkAArch64. NFC
1 parent e520b28 commit 8440ced

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lld/ELF/Thunks.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,9 +1373,8 @@ Thunk::Thunk(Ctx &ctx, Symbol &d, int64_t a)
13731373
Thunk::~Thunk() = default;
13741374

13751375
static Thunk *addThunkAArch64(Ctx &ctx, RelType type, Symbol &s, int64_t a) {
1376-
if (type != R_AARCH64_CALL26 && type != R_AARCH64_JUMP26 &&
1377-
type != R_AARCH64_PLT32)
1378-
Fatal(ctx) << "unrecognized relocation type";
1376+
assert(is_contained({R_AARCH64_CALL26, R_AARCH64_JUMP26, R_AARCH64_PLT32},
1377+
type));
13791378
bool mayNeedLandingPad =
13801379
(ctx.arg.andFeatures & GNU_PROPERTY_AARCH64_FEATURE_1_BTI) &&
13811380
!isAArch64BTILandingPad(ctx, s, a);

0 commit comments

Comments
 (0)