aboutsummaryrefslogtreecommitdiff
path: root/clang/tools
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2013-09-14 00:41:32 +0000
committerJordan Rose <jordan_rose@apple.com>2013-09-14 00:41:32 +0000
commite10c8595835b1a00560c96f4b894fcd0d8f34901 (patch)
tree3da391e0f90c2ba98f0c328f465243add5764966 /clang/tools
parented3252fb485cc32af61dc34ea29063d33fd02e7c (diff)
downloadllvm-e10c8595835b1a00560c96f4b894fcd0d8f34901.zip
llvm-e10c8595835b1a00560c96f4b894fcd0d8f34901.tar.gz
llvm-e10c8595835b1a00560c96f4b894fcd0d8f34901.tar.bz2
[analyzer] Put more uniqueness in scan-build's temporary directory names.
This is necessary when running two scan-build processes in parallel. The directory naming scheme is now: yyyy-MM-dd-HHmmss-PID-N 2013-09-13-174210-123-1 where "PID" is the scan-build process ID, and "N" is a sequential counter (not likely to be needed now that seconds are mangled in, but just in case). PR17196, using a suggested fix from Greg Czajkowski! llvm-svn: 190735
Diffstat (limited to 'clang/tools')
-rwxr-xr-xclang/tools/scan-build/scan-build14
1 files changed, 11 insertions, 3 deletions
diff --git a/clang/tools/scan-build/scan-build b/clang/tools/scan-build/scan-build
index 4590279..4fcd74e 100755
--- a/clang/tools/scan-build/scan-build
+++ b/clang/tools/scan-build/scan-build
@@ -135,7 +135,13 @@ sub GetHTMLRunDir {
my $year = $CurrentTime[5] + 1900;
my $day = $CurrentTime[3];
my $month = $CurrentTime[4] + 1;
- my $DateString = sprintf("%d-%02d-%02d", $year, $month, $day);
+ my $hour = $CurrentTime[2];
+ my $min = $CurrentTime[1];
+ my $sec = $CurrentTime[0];
+
+ my $TimeString = sprintf("%02d%02d%02d", $hour, $min, $sec)
+ my $DateString = sprintf("%d-%02d-%02d-%s-$$",
+ $year, $month, $day, $TimeString);
# Determine the run number.
my $RunNumber;
@@ -162,9 +168,11 @@ sub GetHTMLRunDir {
next if ($x[0] != $year);
next if ($x[1] != $month);
next if ($x[2] != $day);
+ next if ($x[3] != $TimeString);
+ next if ($x[4] != $$);
- if ($x[3] > $max) {
- $max = $x[3];
+ if ($x[5] > $max) {
+ $max = $x[5];
}
}