diff --git a/llvm/lib/ExecutionEngine/Orc/PerfSupportPlugin.cpp b/llvm/lib/ExecutionEngine/Orc/PerfSupportPlugin.cpp --- a/llvm/lib/ExecutionEngine/Orc/PerfSupportPlugin.cpp +++ b/llvm/lib/ExecutionEngine/Orc/PerfSupportPlugin.cpp @@ -52,9 +52,9 @@ // binary search table goes here size_t HeaderSize = (sizeof(Version) + sizeof(EhFramePtrEnc) + - sizeof(FDECountEnc) + sizeof(TableEnc) + absolute + sizeof(FDECountEnc) + sizeof(TableEnc) + (absolute ? sizeof(uint64_t) - : sizeof(EHFrameRelocation)); + : sizeof(EHFrameRelocation))); std::string HeaderContent(HeaderSize, '\0'); BinaryStreamWriter Writer( MutableArrayRef( @@ -69,8 +69,7 @@ if (auto Err = Writer.writeInteger(TableEnc)) return std::move(Err); if (absolute) { - uint64_t EHFrameAddr = support::endian::byte_swap( - SectionRange(EHFrame).getStart().getValue(), endianness); + uint64_t EHFrameAddr = SectionRange(EHFrame).getStart().getValue(); if (auto Err = Writer.writeInteger(EHFrameAddr)) return std::move(Err); } else {