[llvm] a0a3096 - Addition to Fddf5bfd6e6e2fc5b94718a29e718b4f821a3b853

Alexey Lapshin via llvm-commits llvm-commits at lists.llvm.org
Wed May 17 06:55:38 PDT 2023


Author: Alexey Lapshin
Date: 2023-05-17T15:53:25+02:00
New Revision: a0a30965d0a9d42e15a48992f8cefede7ca07b9b

URL: https://github.com/llvm/llvm-project/commit/a0a30965d0a9d42e15a48992f8cefede7ca07b9b
DIFF: https://github.com/llvm/llvm-project/commit/a0a30965d0a9d42e15a48992f8cefede7ca07b9b.diff

LOG: Addition to Fddf5bfd6e6e2fc5b94718a29e718b4f821a3b853

Fix test bot breakage from bd0dd27bb5be0fbf60c1b2a4ce15188812388574

This addresses the issue found by: https://lab.llvm.org/buildbot/#/builders/93/builds/14929

Added: 
    

Modified: 
    llvm/lib/DWARFLinker/DWARFLinker.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/DWARFLinker/DWARFLinker.cpp b/llvm/lib/DWARFLinker/DWARFLinker.cpp
index b87fb98cb269e..894c4e561e95a 100644
--- a/llvm/lib/DWARFLinker/DWARFLinker.cpp
+++ b/llvm/lib/DWARFLinker/DWARFLinker.cpp
@@ -1208,7 +1208,7 @@ void DWARFLinker::DIECloner::cloneExpression(
         // processed by applyValidRelocs.
         OutputBuffer.push_back(dwarf::DW_OP_addr);
         uint64_t LinkedAddress = SA->Address + AddrRelocAdjustment;
-        if (!IsLittleEndian)
+        if (IsLittleEndian != sys::IsLittleEndianHost)
           sys::swapByteOrder(LinkedAddress);
         ArrayRef<uint8_t> AddressBytes(
             reinterpret_cast<const uint8_t *>(&LinkedAddress),
@@ -1242,7 +1242,7 @@ void DWARFLinker::DIECloner::cloneExpression(
         if (OutOperandKind) {
           OutputBuffer.push_back(*OutOperandKind);
           uint64_t LinkedAddress = SA->Address + AddrRelocAdjustment;
-          if (!IsLittleEndian)
+          if (IsLittleEndian != sys::IsLittleEndianHost)
             sys::swapByteOrder(LinkedAddress);
           ArrayRef<uint8_t> AddressBytes(
               reinterpret_cast<const uint8_t *>(&LinkedAddress),


        


More information about the llvm-commits mailing list