Skip to content

Commit 2dc3371

Browse files
committed
[NFC] Remove redundant range check
Remove gratuitous check introduced in 25c0ea2 which was generating a warning when compiling under GCC.
1 parent f1d3bc4 commit 2dc3371

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/Support/CodeGen.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ namespace llvm {
6464
///
6565
/// Returns std::nullopt if \p ID is invalid.
6666
inline std::optional<Level> getLevel(IDType ID) {
67-
if (ID < 0 || ID > 3)
67+
if (ID > 3)
6868
return std::nullopt;
6969
return static_cast<Level>(ID);
7070
}

0 commit comments

Comments
 (0)