- added helper function printObjectNamesInfo() to print out object file name, archive name, architecture name.
- One small behaviors change.
in the function dumpMachOUniversalBinaryArchAll , delete the functionality:
if (moreThanOneArch) outs() << "\n";
Adding {{[[:space:]].*}} does literally nothing useful, as the whitespace at the start of a line is ignored unless using both --strict-whitespace and --match-full-lines in the FileCheck command. I believe, if you want to check the first line is empty, that you can use:
For later blank lines, you can do CHECK-EMPTY: immediately following a regular CHECK. CHECK-EMPTY works like CHECK-NEXT but ensures the line is completely blank instead of checking against some pattern. Since it works like CHECK-NEXT it cannot be used as the first CHECK pattern however. Conversely, {{^$}} will not always work if used after the first CHECK pattern. This is because FileCheck consumes the string it has matched up to before running the next CHECK. For example, imagine the output was:
And we have the following CHECKs:
to test that there is a blank line between foo and bar. In this case, after matching foo, the output will look like a blank line, followed by a line containing bar. The attempt to check for an empty line matches the first line (at the end of foo), which is not the line after the previous match, so the CHECK-NEXT fails.
(Aside, not something for you to fix, but this test is full of holes, and could fail to catch symbols in the output that shouldn't be present, or other additional lines).