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