[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / utils / VtableTest / check-ztt
blob4a83c55796a40a3565214b7c8d321238ef8cb949
1 #!/bin/sh
3 N_STRUCTS=300
5 # Utility routine to "hand" check VTTs.
7 let i=1;
8 while [ $i != $N_STRUCTS ]; do
9 sed -n "/^__ZTT.*s$i:/,/\.[sgm][elo]/p" test-clang.s |
10 grep -v '\.[sgm][elo]' | sed -e 's/[()]//g' -e '/^$/d' >test-clang-ztt
11 sed -n "/^__ZTT.*s$i:/,/\.[sgm][elo]/p" test-gcc.s |
12 grep -v '\.[sgm][elo]' | sed -e 's/[()]//g' -e 's/ + /+/' >test-gcc-ztt
13 diff -U3 test-gcc-ztt test-clang-ztt
14 if [ $? != 0 ]; then
15 echo "FAIL: s$i VTT"
16 else
17 echo "PASS: s$i VTT"
19 let i=i+1
20 done