Author: Matej Košík
Date: 2025-11-26T17:09:18-08:00
New Revision: b7eb9883dc9014a392f6435ba9b4058c8f8efd3f

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

LOG: [lldb] Use InlHostByteOrder in RegisterValue::SetValueFromData (#169624)

An existing code can be further simplified.

---------

Co-authored-by: Matej Košík <[email protected]>

Added: 
    

Modified: 
    lldb/source/Utility/RegisterValue.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Utility/RegisterValue.cpp 
b/lldb/source/Utility/RegisterValue.cpp
index c28c9e2d4d106..4d762dc80e7f5 100644
--- a/lldb/source/Utility/RegisterValue.cpp
+++ b/lldb/source/Utility/RegisterValue.cpp
@@ -196,9 +196,7 @@ Status RegisterValue::SetValueFromData(const RegisterInfo 
&reg_info,
       SetUInt64(src.GetMaxU64(&src_offset, src_len));
     else {
       std::vector<uint8_t> native_endian_src(src_len, 0);
-      src.ExtractBytes(src_offset, src_len,
-                       llvm::sys::IsLittleEndianHost ? eByteOrderLittle
-                                                     : eByteOrderBig,
+      src.ExtractBytes(src_offset, src_len, endian::InlHostByteOrder(),
                        native_endian_src.data());
       llvm::APInt uint = llvm::APInt::getZero(src_len * 8);
       llvm::LoadIntFromMemory(uint, native_endian_src.data(), src_len);


        
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to