[flang-commits] [flang] 5034e17 - [flang] Remove runtime check from OpenFile::Close()
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Tue Dec 7 09:43:57 PST 2021
Author: Peter Klausler
Date: 2021-12-07T09:43:24-08:00
New Revision: 5034e1730f7a4dbd8004900096c4b176d24f13cb
URL: https://github.com/llvm/llvm-project/commit/5034e1730f7a4dbd8004900096c4b176d24f13cb
DIFF: https://github.com/llvm/llvm-project/commit/5034e1730f7a4dbd8004900096c4b176d24f13cb.diff
LOG: [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
Added:
Modified:
flang/runtime/file.cpp
Removed:
################################################################################
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) {
More information about the flang-commits
mailing list