Actually looking at the dumped IR is usually not interesting, the tests just
need to get to that stage to be able to perform the validation
correctly. Additionally, the IR is very large for some of these tests, so
dumping it makes things sllooooowww when something fails.
It is semantically incorrect to miss a symbol, and just misleading to
include an incorrect one in the TBD file (and, it would take a compiler
bug to actually try to reference one from some downstream code), so it
is better to err on the side of including extra symbols than missing
some.
For now, computing the actual directness of a field is difficult, so
let's include both of them.
Fixes rdar://problem/32253411 .
It can now:
- not validate (=none)
- validate that all symbols in the IR are also in the TBD (=missing),
- validate the above, and also that all in the TBD are in the IR (=all).
The first and last were switched between with the old boolean flag, the
second is new.
The list of missing symbols is different on linux, without objc support,
meaning the diff-based testing fails. This is only a problem when we
have do this diffing, so just conditionalise it for now.
Only one of these tests actually "passes", since TBDGen is incomplete,
but the use of FileCheck means they'll be flagged to be updated as
TBDGen improves: the failures are known problems.