Skip to content

Commit a727af6

Browse files
tbaederrGeneraluseAI
authored andcommitted
[clang][bytecode][NFC] Remove unused Integral range functions (llvm#169508)
1 parent fbb8328 commit a727af6

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

clang/lib/AST/ByteCode/Integral.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,6 @@ template <unsigned Bits, bool Signed> class Integral final {
217217
return Integral(Value.V);
218218
}
219219

220-
static bool inRange(int64_t Value, unsigned NumBits) {
221-
return CheckRange<ReprT, Min, Max>(Value);
222-
}
223-
224220
static bool increment(Integral A, Integral *R) {
225221
return add(A, Integral(ReprT(1)), A.bitWidth(), R);
226222
}
@@ -323,13 +319,6 @@ template <unsigned Bits, bool Signed> class Integral final {
323319
return false;
324320
}
325321
}
326-
template <typename T, T Min, T Max> static bool CheckRange(int64_t V) {
327-
if constexpr (std::is_signed_v<T>) {
328-
return Min <= V && V <= Max;
329-
} else {
330-
return V >= 0 && static_cast<uint64_t>(V) <= Max;
331-
}
332-
}
333322
};
334323

335324
template <unsigned Bits, bool Signed>

0 commit comments

Comments
 (0)