projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a59628
)
[MemoryBuffer] Revert unintended MemoryBuffer change from D86996
author
Fangrui Song
<i@maskray.me>
Tue, 15 Sep 2020 17:20:08 +0000
(10:20 -0700)
committer
Fangrui Song
<i@maskray.me>
Tue, 15 Sep 2020 17:21:05 +0000
(10:21 -0700)
Fixes SupportsTest MemoryBufferTest.mmapVolatileNoNull
llvm/lib/Support/MemoryBuffer.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Support/MemoryBuffer.cpp
b/llvm/lib/Support/MemoryBuffer.cpp
index
e31c8e6
..
248fb72
100644
(file)
--- a/
llvm/lib/Support/MemoryBuffer.cpp
+++ b/
llvm/lib/Support/MemoryBuffer.cpp
@@
-457,7
+457,8
@@
getOpenFileImpl(sys::fs::file_t FD, const Twine &Filename, uint64_t FileSize,
MapSize = FileSize;
}
- if (false) {
+ if (shouldUseMmap(FD, FileSize, MapSize, Offset, RequiresNullTerminator,
+ PageSize, IsVolatile)) {
std::error_code EC;
std::unique_ptr<MB> Result(
new (NamedBufferAlloc(Filename)) MemoryBufferMMapFile<MB>(