[lldb] Rewrite Scalar::Promote
This function was implementing c-like promotion rules by switching on the both types. C promotion rules are complicated, but they are not *that* complicated -- they basically boil down to: - wider types trump narrower ones - unsigned trump signed - floating point trumps integral With a couple of helper functions, we can rewrite the function in terms of these rules and greatly reduce the size and complexity of this function.
parent
0ccfe1b2
Please register or sign in to comment