From: Zachary Turner Date: Mon, 5 Jun 2017 22:12:23 +0000 (+0000) Subject: [CodeView] Fix endianness bug. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=efcc38aeb35c242c23cab87654b26d4691c5c833;p=llvm [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 --- 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();