[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.
Loading
Please sign in to comment