1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
llvm-mirror/unittests
Pavel Labath 6192ffc4b1 [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
2017-12-19 12:15:50 +00:00
..
ADT Fix APFloat from string conversion for Inf 2017-12-19 04:27:39 +00:00
Analysis [SimplifyLibCalls] Inline calls to cabs when it's safe to do so 2017-12-16 01:26:25 +00:00
AsmParser Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
BinaryFormat [BinaryFormat] Fix out of bounds read. 2017-08-31 12:50:42 +00:00
Bitcode Remove redundant includes from unittests. 2017-12-13 21:31:05 +00:00
CodeGen MachineFunction: Slight refactoring; NFC 2017-12-15 22:22:46 +00:00
DebugInfo Recommit "[DWARFv5] Dump an MD5 checksum in the line-table header." 2017-12-18 19:08:35 +00:00
ExecutionEngine Remove redundant includes from unittests. 2017-12-13 21:31:05 +00:00
FuzzMutate [FuzzMutate] Only generate loads and stores to the first class sized types 2017-12-13 11:49:04 +00:00
IR [ConstantRange] Support for ashr in ConstantRange computation 2017-12-18 13:01:32 +00:00
LineEditor
Linker Fix build for LLVM unittests 2017-09-15 21:12:13 +00:00
MC Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
MI Remove redundant includes from unittests. 2017-12-13 21:31:05 +00:00
Object Fix unittest for buildbot with mips host (32bit big endian) from r295174 2017-02-15 16:03:22 +00:00
ObjectYAML
Option [GSoC] Flag value completion for clang 2017-06-20 16:31:31 +00:00
ProfileData Remove redundant includes from unittests. 2017-12-13 21:31:05 +00:00
Support [Support] Add WritableMemoryBuffer class 2017-12-19 12:15:50 +00:00
Target Reapply "[GlobalISel] Remove the GISelAccessor API." 2017-08-15 22:31:51 +00:00
tools [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
Transforms Generalize llvm::replaceDbgDeclare and actually support the use-case that 2017-12-08 21:58:18 +00:00
XRay [XRay][graph] Disambiguate name of type from member name 2017-02-10 06:59:25 +00:00
CMakeLists.txt Reland 'Classify llvm-cfi-verify.' 2017-10-11 20:35:01 +00:00