summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Yartsev <anton.yartsev@gmail.com>2015-06-17 23:12:33 +0000
committerAnton Yartsev <anton.yartsev@gmail.com>2015-06-17 23:12:33 +0000
commit321b176a0856df7a75b3ac073d5839ec35bee397 (patch)
tree6381e5bb596ed86fec564d1ce86c5617e3cdd9a4
parent75ea855fd7d4720ca07a0a52d10113593bff17db (diff)
downloadbcm5719-llvm-321b176a0856df7a75b3ac073d5839ec35bee397.tar.gz
bcm5719-llvm-321b176a0856df7a75b3ac073d5839ec35bee397.zip
[analyzer] Close file handle before output to file from external command.
An old code caused problems under Windows - additional temporary file was created for clang preprocessor output while the right output file remained empty. llvm-svn: 239970
-rwxr-xr-xclang/tools/scan-build/ccc-analyzer2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/tools/scan-build/ccc-analyzer b/clang/tools/scan-build/ccc-analyzer
index 4549b29a806..cf56d14ebe8 100755
--- a/clang/tools/scan-build/ccc-analyzer
+++ b/clang/tools/scan-build/ccc-analyzer
@@ -135,8 +135,8 @@ sub ProcessClangFailure {
my ($PPH, $PPFile) = tempfile( $prefix . "_XXXXXX",
SUFFIX => GetPPExt($Lang),
DIR => $Dir);
- system $Clang, @$Args, "-E", "-o", $PPFile;
close ($PPH);
+ system $Clang, @$Args, "-E", "-o", $PPFile;
# Create the info file.
open (OUT, ">", "$PPFile.info.txt") or die "Cannot open $PPFile.info.txt\n";
OpenPOWER on IntegriCloud