[flang] Use a file descriptor in Temp struct (flang-compiler/f18#1036)
authorSteve Scalpone <sscalpone@nvidia.com>
Thu, 5 Mar 2020 15:09:29 +0000 (07:09 -0800)
committerGitHub <noreply@github.com>
Thu, 5 Mar 2020 15:09:29 +0000 (07:09 -0800)
commit61106305b66a9c260c3eb8cfce95469f97a60a46
treeb498c931dc386c0676a9cf7c9d71718e0c1c5ad8
parente8f09da68d72ccfcf1182b9a7f25f8e98cfb3dd6
[flang] Use a file descriptor in Temp struct (flang-compiler/f18#1036)

The struct Temp is used in the function call createUniqueFile
which only takes in a file descriptor instead of a file handler.
In Unix these are the same thing, but in Windows they are different.
Therefore, the type of the member of struct Temp is changed
from file handler to file descriptor and when closing the file
the file descriptor is converted to a file handler.

Original-commit: flang-compiler/f18@a8edb328f717305143ac827132c6d6f45e6e11b9
Reviewed-on: https://github.com/flang-compiler/f18/pull/1036
flang/lib/Semantics/mod-file.cpp