[PATCH] D14535: [analyzer] Fix scan-build to handle missing output directories.
    Devin Coughlin via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Nov 11 12:41:40 PST 2015
    
    
  
This revision was automatically updated to reflect the committed changes.
Closed by commit rL252797: [analyzer] Fix scan-build to handle missing output directories. (authored by dcoughlin).
Changed prior to commit:
  http://reviews.llvm.org/D14535?vs=39799&id=39959#toc
Repository:
  rL LLVM
http://reviews.llvm.org/D14535
Files:
  cfe/trunk/tools/scan-build/scan-build
Index: cfe/trunk/tools/scan-build/scan-build
===================================================================
--- cfe/trunk/tools/scan-build/scan-build
+++ cfe/trunk/tools/scan-build/scan-build
@@ -1478,7 +1478,9 @@
 
       # Construct an absolute path.  Uses the current working directory
       # as a base if the original path was not absolute.
-      $Options{OutputDir} = abs_path(shift @$Args);
+      my $OutDir = shift @$Args;
+      mkpath($OutDir) unless (-e $OutDir);  # abs_path wants existing dir
+      $Options{OutputDir} = abs_path($OutDir);
 
       next;
     }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14535.39959.patch
Type: text/x-patch
Size: 584 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151111/5e6d58b7/attachment.bin>
    
    
More information about the llvm-commits
mailing list