summaryrefslogtreecommitdiffstats
path: root/clang/tools
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2011-09-09 18:43:53 +0000
committerAnna Zaks <ganna@apple.com>2011-09-09 18:43:53 +0000
commit45ce1bf09123503a7d26b27ea8f9b024c91f88fc (patch)
treec5e59d97634c14edd6f2c6452e026645439949d2 /clang/tools
parenta05627ebaf0bf5fbc1d666b677305212743699b1 (diff)
downloadbcm5719-llvm-45ce1bf09123503a7d26b27ea8f9b024c91f88fc.tar.gz
bcm5719-llvm-45ce1bf09123503a7d26b27ea8f9b024c91f88fc.zip
[analyzer] When running scan-build with -plist on ./configure, delete the plist files.
(scan-build does not set the $HtmlDir when running against configure. Previously, this implied that the plist files would appear in the current directory, with this patch they will get deleted.) llvm-svn: 139382
Diffstat (limited to 'clang/tools')
-rwxr-xr-xclang/tools/scan-build/ccc-analyzer10
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/tools/scan-build/ccc-analyzer b/clang/tools/scan-build/ccc-analyzer
index 7793a8db49b..c39e4179514 100755
--- a/clang/tools/scan-build/ccc-analyzer
+++ b/clang/tools/scan-build/ccc-analyzer
@@ -55,7 +55,10 @@ my $ResultFile;
# Remove any stale files at exit.
END {
- if (defined $CleanupFile && -z $CleanupFile) {
+ if (defined $ResultFile && -z $ResultFile) {
+ `rm -f $ResultFile`;
+ }
+ if (defined $CleanupFile) {
`rm -f $CleanupFile`;
}
}
@@ -631,7 +634,10 @@ if ($Action eq 'compile' or $Action eq 'link') {
my ($h, $f) = tempfile("report-XXXXXX", SUFFIX => ".plist",
DIR => $HtmlDir);
$ResultFile = $f;
- $CleanupFile = $f;
+ # If the HtmlDir is not set, we sould clean up the plist files.
+ if (!defined $HtmlDir || -z $HtmlDir) {
+ $CleanupFile = $f;
+ }
}
}
OpenPOWER on IntegriCloud