diff --git a/lld/COFF/PDB.cpp b/lld/COFF/PDB.cpp index 73dc5e39c15b..bd94355f8b92 100644 --- a/lld/COFF/PDB.cpp +++ b/lld/COFF/PDB.cpp @@ -1210,7 +1210,7 @@ void DebugSHandler::finish() { // Rewrite string table indices in the Fpo Data and symbol records to refer to // the global PDB string table instead of the object file string table. for (DebugFrameDataSubsectionRef &FDS : NewFpoFrames) { - const uint32_t *Reloc = FDS.getRelocPtr(); + const ulittle32_t *Reloc = FDS.getRelocPtr(); for (codeview::FrameData FD : FDS) { FD.RvaStart += *Reloc; FD.FrameFunc = diff --git a/llvm/include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h b/llvm/include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h index f74120a53608..847d93f0e985 100644 --- a/llvm/include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h +++ b/llvm/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; };