]> granicus.if.org Git - llvm/commitdiff
[CodeView] Fix endianness bug.
authorZachary Turner <zturner@google.com>
Mon, 5 Jun 2017 22:12:23 +0000 (22:12 +0000)
committerZachary Turner <zturner@google.com>
Mon, 5 Jun 2017 22:12:23 +0000 (22:12 +0000)
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

index d8dca5d5c630b65057f5eafac64f159ff25d30e3..21e2cc56075b70b416aae1cf522fc7fb87dfc701 100644 (file)
@@ -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();