[llvm] r347349 - [CodeView] RelocPtr points to little endian data.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 20 13:30:11 PST 2018
Author: zturner
Date: Tue Nov 20 13:30:11 2018
New Revision: 347349
URL: http://llvm.org/viewvc/llvm-project?rev=347349&view=rev
Log:
[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
Modified:
llvm/trunk/include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h
Modified: llvm/trunk/include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h?rev=347349&r1=347348&r2=347349&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h Tue Nov 20 13:30:11 2018
@@ -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<FrameData>::Iterator begin() const { return Frames.begin(); }
FixedStreamArray<FrameData>::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<FrameData> Frames;
};
More information about the llvm-commits
mailing list