[Lldb-commits] [lldb] [lldb][RISCV] Make char an unsigned type for RISC-V by default (PR #182260)
Georgiy Samoylov via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 19 04:50:37 PST 2026
https://github.com/sga-sc created https://github.com/llvm/llvm-project/pull/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
>From ca095ab06fb439e2b6174c3584bff3f3861b5d66 Mon Sep 17 00:00:00 2001
From: Georgiy Samoylov <Ignitor21838 at gmail.com>
Date: Wed, 18 Feb 2026 19:02:55 +0300
Subject: [PATCH] [lldb][RISCV] Make char an unsigned type for RISC-V by
default
---
lldb/source/Utility/ArchSpec.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lldb/source/Utility/ArchSpec.cpp b/lldb/source/Utility/ArchSpec.cpp
index dfe4351f0c45b..7a6fed11677fc 100644
--- a/lldb/source/Utility/ArchSpec.cpp
+++ b/lldb/source/Utility/ArchSpec.cpp
@@ -721,6 +721,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