mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
simple optimization: don't bother calling "exists" (which calls the syscall
"access"). Instead, just let the open call fail if the file doesn't exist. This reduces the # syscalls executed. llvm-svn: 29173
This commit is contained in:
parent
c373ed8521
commit
4854a2a120
@ -40,9 +40,6 @@ struct sys::MappedFileInfo {
|
||||
};
|
||||
|
||||
void MappedFile::initialize() {
|
||||
if (!path_.exists())
|
||||
throw std::string("Can't open file: ") + path_.toString();
|
||||
|
||||
int mode = 0;
|
||||
if (options_ & READ_ACCESS)
|
||||
if (options_ & WRITE_ACCESS)
|
||||
|
Loading…
Reference in New Issue
Block a user