We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ccb9f0 commit 91c88a4Copy full SHA for 91c88a4
1 file changed
Build/compile
@@ -1,11 +1,17 @@
1
#!/bin/sh
2
+#A script to instrument a program using clang
3
4
+if [[ `clang-8 --version|grep version |egrep ' 8.'` >/dev/null ]];then
5
+
6
+ count=$#
7
+ for i in $@;do
8
+ count=$(($count-1))
9
+ clang -g -fsanitize=address -fsanitize-coverage=no-prune,edge,trace-pc-guard $i -c -o i_out$count.o
10
+ done
11
+ clang trace-pc-guard-cb.cc i_out* -fsanitize=address
12
+ rm i_out*.o
13
-prog=$1
-echo Instrumenting $prog
-count=$#
-for i in $@;do
- count=$(($count-1))
- clang -g -fsanitize=address -fsanitize-coverage=no-prune,edge,trace-pc-guard $i -c -o inst_out$count.o
-done
-clang trace-pc-guard-cb.cc inst_out* -fsanitize=address
14
+else
15
+ echo "Require clang version higher than 6.0"
16
+ exit
17
+fi
0 commit comments