diff options
author | Zachary Turner <zturner@google.com> | 2017-02-28 00:04:07 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-02-28 00:04:07 +0000 |
commit | 695ed56ba5d3bd3b86c6a4ed6d79b89eb8fbd2f4 (patch) | |
tree | caf35bd7345bb071545ef39b636b40ffafc41504 /llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp | |
parent | 59cd89332010b22e82c3110d558ff37948c4df1e (diff) | |
download | llvm-695ed56ba5d3bd3b86c6a4ed6d79b89eb8fbd2f4.zip llvm-695ed56ba5d3bd3b86c6a4ed6d79b89eb8fbd2f4.tar.gz llvm-695ed56ba5d3bd3b86c6a4ed6d79b89eb8fbd2f4.tar.bz2 |
[PDB] Make streams carry their own endianness.
Before the endianness was specified on each call to read
or write of the StreamReader / StreamWriter, but in practice
it's extremely rare for streams to have data encoded in
multiple different endiannesses, so we should optimize for the
99% use case.
This makes the code cleaner and more general, but otherwise
has NFC.
llvm-svn: 296415
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp index 4c85825..dff5334 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp @@ -45,7 +45,8 @@ Error NativeSession::createFromPdb(StringRef Path, return make_error<GenericError>(generic_error_code::invalid_path); std::unique_ptr<MemoryBuffer> Buffer = std::move(*ErrorOrBuffer); - auto Stream = llvm::make_unique<MemoryBufferByteStream>(std::move(Buffer)); + auto Stream = llvm::make_unique<MemoryBufferByteStream>( + std::move(Buffer), llvm::support::little); auto Allocator = llvm::make_unique<BumpPtrAllocator>(); auto File = llvm::make_unique<PDBFile>(Path, std::move(Stream), *Allocator); |