[ThinLTO] Add code comment. NFC
[llvm-core.git] / utils / getsrcs.sh
blobef0ad726774064b5d08475ee1a5b3e4f9a19571a
1 #!/bin/sh
2 ##===- utils/getsrcs.sh - Counts Lines Of Code ---------------*- Script -*-===##
3 #
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
7 # details.
8 #
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
17 # details.
18 ##===----------------------------------------------------------------------===##
20 if test "$1" = "-topdir" ; then
21 TOPDIR="$2"
22 shift; shift;
23 else
24 TOPDIR=`llvm-config --src-root`
27 if test -d "$TOPDIR" ; then
28 cd $TOPDIR
29 ./utils/llvmdo -topdir "$TOPDIR" \
30 -dirs "include lib tools utils examples projects" echo
31 else
32 echo "Can't find LLVM top directory"