[objc-arc] Convert the bodies of ARCInstKind predicates into covered switches.
authorMichael Gottesman <mgottesman@apple.com>
Thu, 19 Feb 2015 19:51:36 +0000 (19:51 +0000)
committerMichael Gottesman <mgottesman@apple.com>
Thu, 19 Feb 2015 19:51:36 +0000 (19:51 +0000)
commit921fa44c4447824c540139a31eb59ca4d7c5a917
tree3b3c2718e7dc9479b68875a721d618aa64fca85d
parentb2f47bdbc2a059676016762f905d1f27bec61d58
[objc-arc] Convert the bodies of ARCInstKind predicates into covered switches.

This is much better than the previous manner of just using
short-curcuiting booleans from:

1. A "naive" efficiency perspective: we do not have to rely on the
compiler to change the short circuiting boolean operations into a
switch.
2. An understanding perspective by making the implicit behavior of
negative predicates explicit.
3. A maintainability perspective through the covered switch flag making
it easy to know where to update code when adding new ARCInstKinds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229906 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/ObjCARC/ARCInstKind.cpp
lib/Transforms/ObjCARC/ARCInstKind.h