Mercurial > projects > ldc
diff tester.sh @ 1:c53b6e3fe49a trunk
[svn r5] Initial commit. Most things are very rough.
author | lindquist |
---|---|
date | Sat, 01 Sep 2007 21:43:27 +0200 |
parents | |
children | d3ee9efe20e2 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tester.sh Sat Sep 01 21:43:27 2007 +0200 @@ -0,0 +1,29 @@ +#!/bin/bash + +if [ -z $1 ]; then + echo "you need to specify the test name" + exit 1 +fi + +if [ "$2" = "ll" ]; then + make && + llvmdc $1 -Itest -odtest -c && + llvm-dis -f $1.bc && + cat $1.ll + exit $? +elif [ "$2" = "run" ]; then + make && + llvmdc $1 -Itest -odtest -of$1 && + $1 + exit $? +elif [ "$2" = "c" ]; then + make && + llvmdc $1 -Itest -odtest -c + exit $? +elif [ "$2" = "gdb" ]; then + make && + gdb --args llvmdc $1 -Itest -odtest '-c' + exit $? +else + echo "bad command or filename" +fi