Move condition code support functions to Utils and remove code duplication.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Thanks, LGTM.
This looks like a NFC to me and removes some unnecessary code duplication.
lib/Target/ARM/Utils/ARMBaseInfo.h | ||
---|---|---|
51 ↗ | (On Diff #112785) | While you are at it, would it make sense to remove the default case there and add the llvm_unreachable after the switch like in ARMCondCodeToString? This would give the compiler a better chance to warn about missing patterns, but that's only a minor point, as it's unlikely that CondCodes will change. |
lib/Target/ARM/Utils/ARMBaseInfo.h | ||
---|---|---|
51 ↗ | (On Diff #112785) | Thanks. Will do so. |
lib/Target/ARM/Utils/ARMBaseInfo.h | ||
---|---|---|
51 ↗ | (On Diff #112785) | Looking at it again, that does not seem a good idea. There is no 'OppositCondition' for 'AL' (Always). Taking out the default will just trigger sprurious compilation warning - enumeration value 'AL' not handled in switch |