From 695ed56ba5d3bd3b86c6a4ed6d79b89eb8fbd2f4 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Tue, 28 Feb 2017 00:04:07 +0000 Subject: [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 --- llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp') diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp index 4c858253b79..dff53344545 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(generic_error_code::invalid_path); std::unique_ptr Buffer = std::move(*ErrorOrBuffer); - auto Stream = llvm::make_unique(std::move(Buffer)); + auto Stream = llvm::make_unique( + std::move(Buffer), llvm::support::little); auto Allocator = llvm::make_unique(); auto File = llvm::make_unique(Path, std::move(Stream), *Allocator); -- cgit v1.2.3