check-zvt 439 B

123456789101112131415161718
  1. #!/bin/sh
  2. N_STRUCTS=300
  3. # Utility routine to "hand" check vtables.
  4. let i=1;
  5. while [ $i != $N_STRUCTS ]; do
  6. sed -n "/^__ZTV.*s$i:/,/\.[sg][el]/p" test-clang.s | grep -v '\.[sg][el]' >test-clang-ztv
  7. sed -n "/^__ZTV.*s$i:/,/\.[sg][el]/p" test-gcc.s | grep -v '\.[sg][el]' >test-gcc-ztv
  8. diff -U3 test-gcc-ztv test-clang-ztv
  9. if [ $? != 0 ]; then
  10. echo "FAIL: s$i vtable"
  11. else
  12. echo "PASS: s$i vtable"
  13. fi
  14. let i=i+1
  15. done