aboutsummaryrefslogtreecommitdiffstats
path: root/lib/System/Unix
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-07-18 07:07:51 +0000
committerChris Lattner <sabre@nondot.org>2006-07-18 07:07:51 +0000
commitff3d80ff7e167a8b6e84621ed155481c8b6a2bb4 (patch)
tree11a5330ac007b6470759122a724054415d93c5d5 /lib/System/Unix
parent84bad2f96c42e62238bb29f6344eadd7006826b2 (diff)
downloadexternal_llvm-ff3d80ff7e167a8b6e84621ed155481c8b6a2bb4.zip
external_llvm-ff3d80ff7e167a8b6e84621ed155481c8b6a2bb4.tar.gz
external_llvm-ff3d80ff7e167a8b6e84621ed155481c8b6a2bb4.tar.bz2
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
Diffstat (limited to 'lib/System/Unix')
-rw-r--r--lib/System/Unix/MappedFile.inc3
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/System/Unix/MappedFile.inc b/lib/System/Unix/MappedFile.inc
index 148372b..341ee25 100644
--- a/lib/System/Unix/MappedFile.inc
+++ b/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)