[PATCH] D54421: [CodeView] RelocPtr points to little-endian data

James Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 12 03:35:11 PST 2018


jrtc27 created this revision.
jrtc27 added a reviewer: zturner.
Herald added a subscriber: llvm-commits.

This misleading type meant LLD incorrectly took it to be in native
endianness and fail its COFF/pdb-framedata.yaml test on big-endian
hosts.


Repository:
  rL LLVM

https://reviews.llvm.org/D54421

Files:
  include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h


Index: include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h
===================================================================
--- include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h
+++ 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 @@
   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;
 };
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54421.173647.patch
Type: text/x-patch
Size: 973 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181112/f361b10d/attachment.bin>


More information about the llvm-commits mailing list