On Mac OS X, use TMPDIR as the default location to place analysis results. This is a more secure location for such files, and addresses <rdar://problem/6334220>.

llvm-svn: 58491
This commit is contained in:
Ted Kremenek 2008-10-31 05:48:42 +00:00
parent d678ae2da3
commit d15b2b1121
1 changed files with 9 additions and 2 deletions

View File

@ -137,7 +137,14 @@ sub GetHTMLRunDir {
my $TmpMode = 0;
if (!defined $Dir) {
$Dir = "/tmp";
if (`uname` =~ /Darwin/) {
$Dir = $ENV{'TMPDIR'};
if (!defined $Dir) { $Dir = "/tmp"; }
}
else {
$Dir = "/tmp";
}
$TmpMode = 1;
}
@ -848,7 +855,7 @@ OPTIONS:
-o - Target directory for HTML report files. Subdirectories
will be created as needed to represent separate "runs" of
the analyzer. If this option is not specified, a directory
is created in /tmp to store the reports.
is created in /tmp (TMPDIR on Mac OS X) to store the reports.
-h - Display this message.
--help