mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 22:00:10 +00:00
[flang] INQUIRE(FILE=path, READ/READWRITE/WRITE=x) should be UNKNOWN when unknown
For nonexistent or inaccessible files, we're returning NO, which is indeed true, but we should return UNKNOWN instead. Differential Revision: https://reviews.llvm.org/D158653
This commit is contained in:
parent
9c0302a772
commit
7db0610c06
@ -1347,13 +1347,16 @@ bool InquireUnconnectedFileState::Inquire(
|
||||
str = "UNKNONN";
|
||||
break;
|
||||
case HashInquiryKeyword("READ"):
|
||||
str = MayRead(path_.get()) ? "YES" : "NO";
|
||||
str =
|
||||
IsExtant(path_.get()) ? MayRead(path_.get()) ? "YES" : "NO" : "UNKNOWN";
|
||||
break;
|
||||
case HashInquiryKeyword("READWRITE"):
|
||||
str = MayReadAndWrite(path_.get()) ? "YES" : "NO";
|
||||
str = IsExtant(path_.get()) ? MayReadAndWrite(path_.get()) ? "YES" : "NO"
|
||||
: "UNKNOWN";
|
||||
break;
|
||||
case HashInquiryKeyword("WRITE"):
|
||||
str = MayWrite(path_.get()) ? "YES" : "NO";
|
||||
str = IsExtant(path_.get()) ? MayWrite(path_.get()) ? "YES" : "NO"
|
||||
: "UNKNOWN";
|
||||
break;
|
||||
case HashInquiryKeyword("NAME"):
|
||||
str = path_.get();
|
||||
|
Loading…
Reference in New Issue
Block a user