mirror of
https://github.com/intel/llvm.git
synced 2026-01-19 01:15:50 +08:00
[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
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user