Mercurial > hg > CbC > CbC_llvm
comparison utils/getsrcs.sh @ 171:66f3bfe93da9
git version 2c4ca6832fa6b306ee6a7010bfb80a3f2596f824
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 11:07:02 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
150:1d019706d866 | 171:66f3bfe93da9 |
---|---|
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 ##===----------------------------------------------------------------------===## | |
10 # | |
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. | |
15 # | |
16 # Note that the implementation is based on llvmdo. See that script for more | |
17 # details. | |
18 ##===----------------------------------------------------------------------===## | |
19 | |
20 if test "$1" = "-topdir" ; then | |
21 TOPDIR="$2" | |
22 shift; shift; | |
23 else | |
24 TOPDIR=`llvm-config --src-root` | |
25 fi | |
26 | |
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" | |
33 fi |