[Lldb-commits] [lldb] [lldb] simplify the code (PR #169624)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Nov 26 01:50:31 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Matej Košík (sedymrak)
<details>
<summary>Changes</summary>
An existing code can be further simplified.
---
Full diff: https://github.com/llvm/llvm-project/pull/169624.diff
1 Files Affected:
- (modified) lldb/source/Utility/RegisterValue.cpp (+1-2)
``````````diff
diff --git a/lldb/source/Utility/RegisterValue.cpp b/lldb/source/Utility/RegisterValue.cpp
index c28c9e2d4d106..f555529d314e5 100644
--- a/lldb/source/Utility/RegisterValue.cpp
+++ b/lldb/source/Utility/RegisterValue.cpp
@@ -197,8 +197,7 @@ Status RegisterValue::SetValueFromData(const RegisterInfo ®_info,
else {
std::vector<uint8_t> native_endian_src(src_len, 0);
src.ExtractBytes(src_offset, src_len,
- llvm::sys::IsLittleEndianHost ? eByteOrderLittle
- : eByteOrderBig,
+ endian::InlHostByteOrder(),
native_endian_src.data());
llvm::APInt uint = llvm::APInt::getZero(src_len * 8);
llvm::LoadIntFromMemory(uint, native_endian_src.data(), src_len);
``````````
</details>
https://github.com/llvm/llvm-project/pull/169624
More information about the lldb-commits
mailing list