[cfe-commits] r67972 - /cfe/trunk/utils/scan-build
Ted Kremenek
kremenek at apple.com
Sat Mar 28 17:31:32 PDT 2009
Author: kremenek
Date: Sat Mar 28 19:31:32 2009
New Revision: 67972
URL: http://llvm.org/viewvc/llvm-project?rev=67972&view=rev
Log:
scan-build: Also look for clang-cc in ../libexec
Modified:
cfe/trunk/utils/scan-build
Modified: cfe/trunk/utils/scan-build
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/scan-build?rev=67972&r1=67971&r2=67972&view=diff
==============================================================================
--- cfe/trunk/utils/scan-build (original)
+++ cfe/trunk/utils/scan-build Sat Mar 28 19:31:32 2009
@@ -81,18 +81,21 @@
# Some initial preprocessing of Clang options.
##----------------------------------------------------------------------------##
+# First, look for 'clang-cc' in libexec.
my $ClangSB = Cwd::realpath("$RealBin/libexec/clang-cc");
-
-# Also look for 'clang-cc' in the same directory as scan-build.
+# Second, look for 'clang-cc' in the same directory as scan-build.
if (!defined $ClangSB || ! -x $ClangSB) {
$ClangSB = Cwd::realpath("$RealBin/clang-cc");
}
-
-my $Clang = $ClangSB;
-
+# Third, look for 'clang-cc' in ../libexec
if (!defined $ClangSB || ! -x $ClangSB) {
- $Clang = "clang-cc";
+ $ClangSB = Cwd::realpath("$RealBin/../libexec/clang-cc");
}
+# Finally, default to looking for 'clang-cc' in the path.
+if (!defined $ClangSB || ! -x $ClangSB) {
+ $ClangSB = "clang-cc";
+}
+my $Clang = $ClangSB;
my %AvailableAnalyses;
More information about the cfe-commits
mailing list