[llvm-commits] CVS: llvm/lib/System/Unix/MappedFile.inc

Chris Lattner lattner at cs.uiuc.edu
Tue Jul 18 00:08:04 PDT 2006



Changes in directory llvm/lib/System/Unix:

MappedFile.inc updated: 1.15 -> 1.16
---
Log message:

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.


---
Diffs of the changes:  (+0 -3)

 MappedFile.inc |    3 ---
 1 files changed, 3 deletions(-)


Index: llvm/lib/System/Unix/MappedFile.inc
diff -u llvm/lib/System/Unix/MappedFile.inc:1.15 llvm/lib/System/Unix/MappedFile.inc:1.16
--- llvm/lib/System/Unix/MappedFile.inc:1.15	Tue Jul 18 02:03:14 2006
+++ llvm/lib/System/Unix/MappedFile.inc	Tue Jul 18 02:07:51 2006
@@ -40,9 +40,6 @@
 };
 
 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)






More information about the llvm-commits mailing list