[flang-commits] [PATCH] D115165: [flang] Remove runtime check from OpenFile::Close()
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Mon Dec 6 09:15:45 PST 2021
klausler created this revision.
klausler added a reviewer: vdonaldson.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
klausler requested review of this revision.
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.
https://reviews.llvm.org/D115165
Files:
flang/runtime/file.cpp
Index: flang/runtime/file.cpp
===================================================================
--- flang/runtime/file.cpp
+++ flang/runtime/file.cpp
@@ -157,7 +157,6 @@
}
void OpenFile::Close(CloseStatus status, IoErrorHandler &handler) {
- CheckOpen(handler);
pending_.reset();
knownSize_.reset();
switch (status) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115165.392097.patch
Type: text/x-patch
Size: 334 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20211206/5e5bda7e/attachment.bin>
More information about the flang-commits
mailing list