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