Index: llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp =================================================================== --- llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp +++ llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp @@ -51,7 +51,7 @@ if (static_cast(Value) & 0x3) return make_error("Call target is not 32-bit aligned"); - if (!fitsRangeSignedInt<27>(Value)) + if (!isInt<27>(Value)) return makeTargetOutOfRangeError(G, B, E); uint32_t RawInstr = *(little32_t *)FixupPtr; @@ -65,10 +65,6 @@ } return Error::success(); } - - template static bool fitsRangeSignedInt(int64_t Value) { - return Value >= -(1ll << Bits) && Value < (1ll << Bits); - } }; template