Updated test/create_ll.sh to work with old & new clang versions.

We explicitly specifying all filenames instead of assuming some naming
convention used by clang and opt.

Contributed-by: Johannes Doerfert <doerfert@cs.uni-saarland.de>
llvm-svn: 204726
This commit is contained in:
Tobias Grosser 2014-03-25 15:50:44 +00:00
parent 03c9207c34
commit 5fa36c0ff6

View File

@ -1,11 +1,8 @@
#!/bin/sh
clang -S -emit-llvm -O0 $1
SFILE=`echo $1 | sed -e 's/\.c/.s/g'`
LLFILE=`echo $1 | sed -e 's/\.c/.ll/g'`
opt -correlated-propagation -mem2reg -instcombine -loop-simplify -indvars \
-instnamer ${SFILE} -S > ${LLFILE}
clang -c -S -emit-llvm -O0 $1 -o ${LLFILE}
rm ${SFILE}
opt -correlated-propagation -mem2reg -instcombine -loop-simplify -indvars \
-instnamer ${LLFILE} -S -o ${LLFILE}