Teach legalize to deal with DYNAMIC_STACKALLOC (aka a dynamic llvm alloca)
[oota-llvm.git] / utils / llvmdo
index 4e7465dbdaa02b939f5c3d848ffbebbbf5bad1ab..2a10724c30396da99fbc18711577f5514c472c58 100755 (executable)
@@ -17,7 +17,7 @@
 # used in LLVM as it progresses.
 #
 # Usage:
-#  llvmdo [-dirs "DIRNAMES..." PROGRAM ARGS...
+#  llvmdo [-dirs "DIRNAMES..."] PROGRAM ARGS...
 #
 # The -dirs argument allows you to specify the set of directories that are 
 # searched. By default, everything is searched. Note that you must use quotes
@@ -43,7 +43,6 @@ if test ! -x "$PROGRAM" ; then
   exit 1
 fi
 shift;
-ARGS="$*"
 TOPDIR=`pwd | sed -e 's#\(.*/llvm\).*#\1#'`
 if test -d "$TOPDIR" ; then
   cd $TOPDIR
@@ -103,7 +102,7 @@ if test -d "$TOPDIR" ; then
       \! -name 'FileParser.h' \
       \! -name 'StackerParser.h' \
       \! -name 'StackerParser.cpp' \
-     -exec $PROGRAM $ARGS {} \; \
+     -exec $PROGRAM "$@" {} \; \
     \)
 else
   echo "Can't find LLVM top directory in $TOPDIR"