From bac1f14341c0016f5410c0d119b4b9b598a9c668 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Tue, 20 Nov 2018 21:30:11 +0000 Subject: [PATCH] [CodeView] RelocPtr points to little endian data. Don't use a uint32_t*, use a ulittle32_t* to make this correct on big endian systems. Patch by James Clarke Differential Revision: https://reviews.llvm.org/D54421 llvm-svn: 347349 --- include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h b/include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h index f74120a5360..847d93f0e98 100644 --- a/include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h +++ b/include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h @@ -13,6 +13,7 @@ #include "llvm/DebugInfo/CodeView/CodeView.h" #include "llvm/DebugInfo/CodeView/DebugSubsection.h" #include "llvm/Support/BinaryStreamReader.h" +#include "llvm/Support/Endian.h" #include "llvm/Support/Error.h" namespace llvm { @@ -31,10 +32,10 @@ public: FixedStreamArray::Iterator begin() const { return Frames.begin(); } FixedStreamArray::Iterator end() const { return Frames.end(); } - const uint32_t *getRelocPtr() const { return RelocPtr; } + const support::ulittle32_t *getRelocPtr() const { return RelocPtr; } private: - const uint32_t *RelocPtr = nullptr; + const support::ulittle32_t *RelocPtr = nullptr; FixedStreamArray Frames; };