diff options
author | Chris Lattner <sabre@nondot.org> | 2006-07-18 07:07:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-07-18 07:07:51 +0000 |
commit | 9c6c94a8066f282fe6b625a28f7b5dfd1075a497 (patch) | |
tree | 5db3b41ebb4fcbee30ad26f5afbe74e637ff8e99 /llvm/lib | |
parent | 4a5641525dba725b9d6aa5c624a4c38e22658fc3 (diff) | |
download | bcm5719-llvm-9c6c94a8066f282fe6b625a28f7b5dfd1075a497.tar.gz bcm5719-llvm-9c6c94a8066f282fe6b625a28f7b5dfd1075a497.zip |
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
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/System/Unix/MappedFile.inc | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/llvm/lib/System/Unix/MappedFile.inc b/llvm/lib/System/Unix/MappedFile.inc index 148372b0cc3..341ee254890 100644 --- a/llvm/lib/System/Unix/MappedFile.inc +++ b/llvm/lib/System/Unix/MappedFile.inc @@ -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) |