Mike Stump | 3539f11 | 2010-01-07 22:21:26 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | N_STRUCTS=300 |
| 4 | |
| 5 | # Utility routine to "hand" check vtables. |
| 6 | |
Mike Stump | 3d3744c | 2010-01-08 19:25:36 +0000 | [diff] [blame] | 7 | let i=1; |
Mike Stump | 3539f11 | 2010-01-07 22:21:26 +0000 | [diff] [blame] | 8 | while [ $i != $N_STRUCTS ]; do |
| 9 | sed -n "/^__ZTV.*s$i:/,/\.[sg][el]/p" test-clang.s | grep -v '\.[sg][el]' >test-clang-ztv |
| 10 | sed -n "/^__ZTV.*s$i:/,/\.[sg][el]/p" test-gcc.s | grep -v '\.[sg][el]' >test-gcc-ztv |
| 11 | diff -U3 test-gcc-ztv test-clang-ztv |
| 12 | if [ $? != 0 ]; then |
| 13 | echo "FAIL: s$i vtable" |
| 14 | else |
| 15 | echo "PASS: s$i vtable" |
| 16 | fi |
| 17 | let i=i+1 |
| 18 | done |