llvm-project
9f64d75f - [Support] Simplify the continuation condition in encodeSLEB128 (NFC) (#165651)

Commit
44 days ago
[Support] Simplify the continuation condition in encodeSLEB128 (NFC) (#165651) The boolean expression to determine if more bytes are needed for a signed LEB128 value is quite complex: !((((Value == 0 ) && ((Byte & 0x40) == 0)) || ((Value == -1) && ((Byte & 0x40) != 0)))) This patch simplifies it to an equivalent expression using a ternary operator, which is much easier to understand.
Parents
Loading