mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-14 06:37:33 +00: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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29173 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
84bad2f96c
commit
ff3d80ff7e
@ -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…
x
Reference in New Issue
Block a user