aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/DebugInfo/CodeView/DebugCrossExSubsection.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-06-05 22:12:23 +0000
committerZachary Turner <zturner@google.com>2017-06-05 22:12:23 +0000
commit88101dadcc7248133de4add4396ee1e9f2b0e406 (patch)
tree0682ab76a72edc55761edd288897fc9ce5e97f18 /llvm/lib/DebugInfo/CodeView/DebugCrossExSubsection.cpp
parentf878a84cc4d58035c0d622b988af6fb5f286f140 (diff)
downloadllvm-88101dadcc7248133de4add4396ee1e9f2b0e406.zip
llvm-88101dadcc7248133de4add4396ee1e9f2b0e406.tar.gz
llvm-88101dadcc7248133de4add4396ee1e9f2b0e406.tar.bz2
[CodeView] Fix endianness bug.
We should be outputting in little endian, but we were writing in host endianness. llvm-svn: 304741
Diffstat (limited to 'llvm/lib/DebugInfo/CodeView/DebugCrossExSubsection.cpp')
-rw-r--r--llvm/lib/DebugInfo/CodeView/DebugCrossExSubsection.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/CodeView/DebugCrossExSubsection.cpp b/llvm/lib/DebugInfo/CodeView/DebugCrossExSubsection.cpp
index d8dca5d..21e2cc5 100644
--- a/llvm/lib/DebugInfo/CodeView/DebugCrossExSubsection.cpp
+++ b/llvm/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();