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