Add FileSystem::CreateReadonlyDataBuffer to allow lldb to open files
using mmap() (i.e. without any heap allocation).
There's no functionality change intended here. We've been getting
reports of lldb using 2GB+ of heap memory while debugging Xcode [1], and
I think this should help with that.
This is WIP because ObjectFileELF::RelocateDebugSections mutates a buffer
obtained from ObjectFile. SymbolFile/DWARF/parallel-indexing-stress.s is the
only failing test, everything else passes with the current patch (on Darwin).
rdar://53785446
[1] heap report from two different users:
Count Bytes Avg Size Symbol
11404 2143015136 187917.8 (anonymous namespace)::MemoryBufferMem<llvm::WritableMemoryBuffer> C++ LLDB
11948 2537624624 212389.1 (anonymous namespace)::MemoryBufferMem<llvm::WritableMemoryBuffer> C++ LLDB