From efcc38aeb35c242c23cab87654b26d4691c5c833 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Mon, 5 Jun 2017 22:12:23 +0000 Subject: [PATCH] [CodeView] Fix endianness bug. We should be outputting in little endian, but we were writing in host endianness. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304741 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/DebugInfo/CodeView/DebugCrossExSubsection.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/DebugInfo/CodeView/DebugCrossExSubsection.cpp b/lib/DebugInfo/CodeView/DebugCrossExSubsection.cpp index d8dca5d5c63..21e2cc56075 100644 --- a/lib/DebugInfo/CodeView/DebugCrossExSubsection.cpp +++ b/lib/DebugInfo/CodeView/DebugCrossExSubsection.cpp @@ -42,7 +42,9 @@ uint32_t DebugCrossModuleExportsSubsection::calculateSerializedSize() const { Error DebugCrossModuleExportsSubsection::commit( BinaryStreamWriter &Writer) const { for (const auto &M : Mappings) { - if (auto EC = Writer.writeObject(M)) + if (auto EC = Writer.writeInteger(M.first)) + return EC; + if (auto EC = Writer.writeInteger(M.second)) return EC; } return Error::success(); -- 2.50.1