[Lldb-commits] [lldb] 47ad905 - [lldb][RISCV] Make char an unsigned type for RISC-V by default (#182260)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Feb 20 11:14:36 PST 2026
Author: Georgiy Samoylov
Date: 2026-02-20T11:14:31-08:00
New Revision: 47ad905d8d8d46e48b2a544009ca66f5c809cc95
URL: https://github.com/llvm/llvm-project/commit/47ad905d8d8d46e48b2a544009ca66f5c809cc95
DIFF: https://github.com/llvm/llvm-project/commit/47ad905d8d8d46e48b2a544009ca66f5c809cc95.diff
LOG: [lldb][RISCV] Make char an unsigned type for RISC-V by default (#182260)
According to RISC-V ELF psABI, Section 4.3 (C/C++ Type Representations)
"char is unsigned".
This patch makes plain `char` unsigned by default on RISC-V. Also this
fixes TestConstStaticIntegralMember.py on RISC-V
Added:
Modified:
lldb/source/Utility/ArchSpec.cpp
Removed:
################################################################################
diff --git a/lldb/source/Utility/ArchSpec.cpp b/lldb/source/Utility/ArchSpec.cpp
index 7c7ee01815291..f998e355691e9 100644
--- a/lldb/source/Utility/ArchSpec.cpp
+++ b/lldb/source/Utility/ArchSpec.cpp
@@ -717,6 +717,8 @@ bool ArchSpec::CharIsSignedByDefault() const {
case llvm::Triple::ppc64:
return m_triple.isOSDarwin();
+ case llvm::Triple::riscv64:
+ case llvm::Triple::riscv32:
case llvm::Triple::ppc64le:
case llvm::Triple::systemz:
case llvm::Triple::xcore:
More information about the lldb-commits
mailing list