diff options
author | Peter Klausler <pklausler@nvidia.com> | 2021-12-06 07:42:13 -0800 |
---|---|---|
committer | Peter Klausler <pklausler@nvidia.com> | 2021-12-07 09:43:24 -0800 |
commit | 5034e1730f7a4dbd8004900096c4b176d24f13cb (patch) | |
tree | 3367977e69c91b173d392bf2fcd341caa0f6e3be | |
parent | c84616c3b368f1ca679a08d2ce131f01a9f14ce9 (diff) | |
download | llvm-5034e1730f7a4dbd8004900096c4b176d24f13cb.tar.gz |
[flang] Remove runtime check from OpenFile::Close()
In error cases it is possible to CLOSE a unit that has not
been successfully connected, so don't crash when the file descriptor
is negative.
Differential Revision: https://reviews.llvm.org/D115165
-rw-r--r-- | flang/runtime/file.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/flang/runtime/file.cpp b/flang/runtime/file.cpp index 00263fb31e78..4e36978cfb23 100644 --- a/flang/runtime/file.cpp +++ b/flang/runtime/file.cpp @@ -157,7 +157,6 @@ void OpenFile::Predefine(int fd) { } void OpenFile::Close(CloseStatus status, IoErrorHandler &handler) { - CheckOpen(handler); pending_.reset(); knownSize_.reset(); switch (status) { |