llvm-project/clang/utils/VtableTest/check-ztt

21 lines
507 B
Plaintext
Raw Normal View History

2010-01-08 06:28:10 +08:00
#!/bin/sh
N_STRUCTS=300
# Utility routine to "hand" check VTTs.
let i=1;
2010-01-08 06:28:10 +08:00
while [ $i != $N_STRUCTS ]; do
sed -n "/^__ZTT.*s$i:/,/\.[sg][el]/p" test-clang.s |
grep -v '\.[sg][el]' | sed -e 's/[()]//g' -e '/^$/d' >test-clang-ztt
2010-01-08 06:28:10 +08:00
sed -n "/^__ZTT.*s$i:/,/\.[sg][el]/p" test-gcc.s |
grep -v '\.[sg][el]' | sed -e 's/[()]//g' -e 's/ + /+/' >test-gcc-ztt
2010-01-08 06:28:10 +08:00
diff -U3 test-gcc-ztt test-clang-ztt
if [ $? != 0 ]; then
echo "FAIL: s$i VTT"
else
echo "PASS: s$i VTT"
fi
let i=i+1
done