From 4854a2a120d13d0c7ff93268de4ee3a05c1e8027 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 18 Jul 2006 07:07:51 +0000 Subject: [PATCH] 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 --- lib/System/Unix/MappedFile.inc | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/System/Unix/MappedFile.inc b/lib/System/Unix/MappedFile.inc index 148372b0cc3..341ee254890 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)