diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2019-08-30 16:56:26 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2019-08-30 16:56:26 +0000 |
commit | 122705b91196cfb905d724a39e0cd8c269a9c9a4 (patch) | |
tree | cb9edc7088e24b5c5ecce2972cd9bab73157fc14 /clang/lib/Basic/FileManager.cpp | |
parent | fd7569c8e366ceb89698a2a3a1b29c6365a2450e (diff) | |
download | bcm5719-llvm-122705b91196cfb905d724a39e0cd8c269a9c9a4.tar.gz bcm5719-llvm-122705b91196cfb905d724a39e0cd8c269a9c9a4.zip |
FileManager: Remove ShouldCloseOpenFile argument from getBufferForFile, NFC
Remove this dead code. We always close it.
llvm-svn: 370488
Diffstat (limited to 'clang/lib/Basic/FileManager.cpp')
-rw-r--r-- | clang/lib/Basic/FileManager.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/clang/lib/Basic/FileManager.cpp b/clang/lib/Basic/FileManager.cpp index ec9ada2f196..4330c7ac61c 100644 --- a/clang/lib/Basic/FileManager.cpp +++ b/clang/lib/Basic/FileManager.cpp @@ -426,8 +426,7 @@ void FileManager::fillRealPathName(FileEntry *UFE, llvm::StringRef FileName) { } llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> -FileManager::getBufferForFile(const FileEntry *Entry, bool isVolatile, - bool ShouldCloseOpenFile) { +FileManager::getBufferForFile(const FileEntry *Entry, bool isVolatile) { uint64_t FileSize = Entry->getSize(); // If there's a high enough chance that the file have changed since we // got its size, force a stat before opening it. @@ -440,10 +439,7 @@ FileManager::getBufferForFile(const FileEntry *Entry, bool isVolatile, auto Result = Entry->File->getBuffer(Filename, FileSize, /*RequiresNullTerminator=*/true, isVolatile); - // FIXME: we need a set of APIs that can make guarantees about whether a - // FileEntry is open or not. - if (ShouldCloseOpenFile) - Entry->closeFile(); + Entry->closeFile(); return Result; } |