1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00
llvm-mirror/lib
Chris Lattner 7f88d9043f Reimplement MemoryBuffer::getFile with three enhancements:
1) stop using MappedFile.
2) if profitable use the sys::path::MapInFilePages api to
   read the file.
3) otherwise fallback to read.

When sys::path::MapInFilePages is implemented, this provides
several benefits:

#1: this avoids fragmenting memory for small files.
#2: this avoids extraneous stat calls when the file size is known.
#3: this only keeps the file descriptor open while reading the 
    file, not for the duration of the lifetime of the memory 
    buffer.  This fixes a serious clang FD 'leak' problem.

I believe that this will work on a win32 machine, but I don't have
one to test on.  I'd appreciate it if someone could check.

llvm-svn: 49031
2008-04-01 06:05:21 +00:00
..
Analysis Set blockBegin to point to the beginning of the block, 2008-03-31 22:08:00 +00:00
Archive change the archive stuff to use MemoryBuffer instead of mappedfile. 2008-04-01 04:26:46 +00:00
AsmParser Add explicit keywords. 2008-03-25 22:06:05 +00:00
Bitcode Add explicit keywords. 2008-03-25 22:06:05 +00:00
CodeGen More soft fp fixes. 2008-04-01 02:18:22 +00:00
Debugger rewrite SourceFile to be in terms of MemoryBuffer, not MappedFile. 2008-04-01 03:59:34 +00:00
ExecutionEngine Fix "Control reaches the end of non-void function" warnings, 2008-03-30 18:22:13 +00:00
Linker Ultimately resolve aliases during linking, if possible 2008-03-11 22:51:09 +00:00
Support Reimplement MemoryBuffer::getFile with three enhancements: 2008-04-01 06:05:21 +00:00
System Stub out some sys::Path::MapInFilePages/UnMapFilePages methods. 2008-04-01 06:00:12 +00:00
Target Unbreak ARM / Thumb soft FP support. 2008-04-01 01:50:16 +00:00
Transforms Emit exception handling info for functions which are 2008-03-31 23:40:23 +00:00
VMCore Don't eliminate bitcast instructions that change the type of a pointer 2008-03-31 00:22:16 +00:00
Makefile remove attribution from lib Makefiles. 2007-12-29 20:09:26 +00:00