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

21 lines
515 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
2010-03-29 11:26:49 +08:00
sed -n "/^__ZTT.*s$i:/,/\.[sgm][elo]/p" test-clang.s |
grep -v '\.[sgm][elo]' | sed -e 's/[()]//g' -e '/^$/d' >test-clang-ztt
sed -n "/^__ZTT.*s$i:/,/\.[sgm][elo]/p" test-gcc.s |
grep -v '\.[sgm][elo]' | 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