aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineOperand.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2017-12-19 12:15:50 +0000
committerPavel Labath <labath@google.com>2017-12-19 12:15:50 +0000
commit605636d8729709d1fb35ab661c1fed54d3f2a56b (patch)
tree81fffd8c568cd3c346ace3c981dadfed857c28cd /llvm/lib/CodeGen/MachineOperand.cpp
parentf6d4ab6daf67d48b626e08b8906e0cf9b3d48275 (diff)
downloadllvm-605636d8729709d1fb35ab661c1fed54d3f2a56b.zip
llvm-605636d8729709d1fb35ab661c1fed54d3f2a56b.tar.gz
llvm-605636d8729709d1fb35ab661c1fed54d3f2a56b.tar.bz2
[Support] Add WritableMemoryBuffer class
Summary: The motivation here is LLDB, where we need to fixup relocations in mmapped files before their contents can be read correctly. The MemoryBuffer class does exactly what we need, *except* that it maps the file in read-only mode. WritableMemoryBuffer reuses the existing machinery for opening and mmapping a file. The only difference is in the argument to the mapped_file_region constructor -- we create a private copy-on-write mapping, so that we can make changes to the mapped data, but the changes aren't carried over to the underlying file. This patch is based on an initial version by Zachary Turner. Reviewers: mehdi_amini, rnk, rafael, dblaikie, zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D40291 llvm-svn: 321071
Diffstat (limited to 'llvm/lib/CodeGen/MachineOperand.cpp')
0 files changed, 0 insertions, 0 deletions