summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/MemoryBuffer.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-12-11 20:12:55 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-12-11 20:12:55 +0000
commit7eb1f1856c3b6549544256da9c4b881f695903cc (patch)
tree09f03a0f890d27db3e57ff0994cc13d82506c69f /llvm/lib/Support/MemoryBuffer.cpp
parent01c73610d0fd4f12f19f44083437106957a737c4 (diff)
downloadbcm5719-llvm-7eb1f1856c3b6549544256da9c4b881f695903cc.tar.gz
bcm5719-llvm-7eb1f1856c3b6549544256da9c4b881f695903cc.zip
Remove a convoluted way of calling close by moving the call to the only caller.
As a bonus we can actually check the return value. llvm-svn: 224046
Diffstat (limited to 'llvm/lib/Support/MemoryBuffer.cpp')
-rw-r--r--llvm/lib/Support/MemoryBuffer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/MemoryBuffer.cpp b/llvm/lib/Support/MemoryBuffer.cpp
index 539b6c3e754..385ed6a5842 100644
--- a/llvm/lib/Support/MemoryBuffer.cpp
+++ b/llvm/lib/Support/MemoryBuffer.cpp
@@ -204,7 +204,7 @@ class MemoryBufferMMapFile : public MemoryBuffer {
public:
MemoryBufferMMapFile(bool RequiresNullTerminator, int FD, uint64_t Len,
uint64_t Offset, std::error_code EC)
- : MFR(FD, false, sys::fs::mapped_file_region::readonly,
+ : MFR(FD, sys::fs::mapped_file_region::readonly,
getLegalMapSize(Len, Offset), getLegalMapOffset(Offset), EC) {
if (!EC) {
const char *Start = getStart(Len, Offset);
OpenPOWER on IntegriCloud