[PATCH] D37179: [ARM] Tidy-up condition-code support functions

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 27 03:19:42 PDT 2017


fhahn accepted this revision.
fhahn added a comment.
This revision is now accepted and ready to land.

Thanks, LGTM.

This looks like a NFC to me and removes some unnecessary code duplication.



================
Comment at: lib/Target/ARM/Utils/ARMBaseInfo.h:51
+  switch (CC) {
+  default: llvm_unreachable("Unknown condition code");
+  case EQ: return NE;
----------------
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.


https://reviews.llvm.org/D37179





More information about the llvm-commits mailing list