De-nest if's and fix mix-up
authorSean Silva <silvas@purdue.edu>
Wed, 19 Sep 2012 02:14:59 +0000 (02:14 +0000)
committerSean Silva <silvas@purdue.edu>
Wed, 19 Sep 2012 02:14:59 +0000 (02:14 +0000)
commit57838db0a1cfcfbb8d1df59562dccd22208cd703
tree64c76c98de78cc69b29ab6f93e7ed9a5f327905b
parentb2df610b44902124c22f3661a39bffd5341da62d
De-nest if's and fix mix-up

Two deeply nested if's obscured that the sense of the conditions was
mixed up. Amazingly, TableGen's output is exactly the same even with the
sense of the tests fixed; it seems that all of TableGen's conversions
are symmetric so that the inverted sense was nonetheless correct "by
accident". As such, I couldn't come up with a test case.

If there does in fact exist a non-symmetric conversion in TableGen's
type system, then a test case should be prepared.

Despite the symmetry, both if's are left in place for robustness in the
face of future changes.

Review by Jakob.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164195 91177308-0d34-0410-b5e6-96231b3b80d8
lib/TableGen/Record.cpp