projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84bad2f
)
simple optimization: don't bother calling "exists" (which calls the syscall
author
Chris Lattner
<sabre@nondot.org>
Tue, 18 Jul 2006 07:07:51 +0000
(07:07 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Tue, 18 Jul 2006 07:07:51 +0000
(07:07 +0000)
"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
lib/System/Unix/MappedFile.inc
patch
|
blob
|
history
diff --git
a/lib/System/Unix/MappedFile.inc
b/lib/System/Unix/MappedFile.inc
index 148372b0cc30b58633302b905782b6663b4144bc..341ee254890246d3d106181c770d69952b5a93e1 100644
(file)
--- 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)