]> granicus.if.org Git - clang/commitdiff
On Mac OS X, use TMPDIR as the default location to place analysis results. This...
authorTed Kremenek <kremenek@apple.com>
Fri, 31 Oct 2008 05:48:42 +0000 (05:48 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 31 Oct 2008 05:48:42 +0000 (05:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58491 91177308-0d34-0410-b5e6-96231b3b80d8

utils/scan-build

index dbdb240b4974c26dd38760d0d327a9d23e0c5924..4ad8a7444e726abaa99aebe93d7c9ca5f305db96 100755 (executable)
@@ -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