2 ##===- utils/getsrcs.sh - Counts Lines Of Code ---------------*- Script -*-===##
4 # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 # See https://llvm.org/LICENSE.txt for license information.
6 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
9 ##===----------------------------------------------------------------------===##
11 # This script just prints out the path names for all the source files in LLVM.
12 # The optional -topdir option can be used to specify the top LLVM source
13 # directory. Without it, the llvm-config command is consulted to find the
14 # top source directory.
16 # Note that the implementation is based on llvmdo. See that script for more
18 ##===----------------------------------------------------------------------===##
20 if test "$1" = "-topdir" ; then
24 TOPDIR
=`llvm-config --src-root`
27 if test -d "$TOPDIR" ; then
29 .
/utils
/llvmdo
-topdir "$TOPDIR" \
30 -dirs "include lib tools utils examples projects" echo
32 echo "Can't find LLVM top directory"