summaryrefslogtreecommitdiff
path: root/utils/llvmgrep
blob: 18af4346e75e908e2f12a4483198bec88a437652 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh
# This is useful because it prints out all of the source files.  Useful for
# greps.
TOPDIR=`pwd | sed -e 's#\(.*/llvm\).*#\1#'`
if test -d "$TOPDIR" ; then
  cd $TOPDIR
  ./utils/llvmdo -dirs "include lib tools utils docs examples test projects" egrep -H -n "$*"
else
  echo "Can't find LLVM top directory in $TOPDIR"
fi