]> granicus.if.org Git - clang/commit
Having FileManager::getFile always open the file, brought much consternation and...
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 16 Mar 2011 19:17:25 +0000 (19:17 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 16 Mar 2011 19:17:25 +0000 (19:17 +0000)
commit3cd0128ce49abe658d1858c541e836e57959e04a
tree7942a744e6e6d177ff469c9fdf965fcf9a3a40e9
parentdb2eae639d3b7ed61ceb56890b73168517ef57f1
Having FileManager::getFile always open the file, brought much consternation and leaking of file descriptors.

Add 'openFile' bool to FileManager::getFile to specify whether we want to have the file opened or not, have it
false by default, and enable it only in HeaderSearch.cpp where the open+fstat optimization matters.

Fixes rdar://9139899.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127748 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/FileManager.h
lib/Basic/FileManager.cpp
lib/Lex/HeaderSearch.cpp