[Lldb-commits] [lldb] [lldb] Fix build problem in llgs tests for RISC-V (PR #127091)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 13 08:38:45 PST 2025
https://github.com/sga-sc created https://github.com/llvm/llvm-project/pull/127091
During testing of LLDB on RISC-V target, tests from the llgs category were built with an error: `Error when building test subject.`
```
llvm-project/lldb/test/API/tools/lldb-server/main.cpp:151:40: error: missing ')' after '__builtin_debugtrap'
151 | #elif __has_builtin(__builtin_debugtrap())
| ~~~~~~~~~~~~~~~~~~~^
llvm-project/lldb/test/API/tools/lldb-server/main.cpp:151:20: note: to match this '('
151 | #elif __has_builtin(__builtin_debugtrap())
| ^
```
This patch fixes this error.
>From 3b40ce56eb57fff5351ad6dc75e9ce3bdd52517a Mon Sep 17 00:00:00 2001
From: Georgiy Samoylov <g.samoylov at syntacore.com>
Date: Thu, 6 Feb 2025 15:01:46 +0300
Subject: [PATCH] [lldb] Fixed build problem in llgs tests for RISC-V
---
lldb/test/API/tools/lldb-server/main.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lldb/test/API/tools/lldb-server/main.cpp b/lldb/test/API/tools/lldb-server/main.cpp
index 5d33ee6e1b0ba..484da8aa4bef9 100644
--- a/lldb/test/API/tools/lldb-server/main.cpp
+++ b/lldb/test/API/tools/lldb-server/main.cpp
@@ -148,7 +148,7 @@ static void trap() {
asm volatile("udf #254");
#elif defined(__powerpc__)
asm volatile("trap");
-#elif __has_builtin(__builtin_debugtrap())
+#elif __has_builtin(__builtin_debugtrap)
__builtin_debugtrap();
#else
#warning Don't know how to generate a trap. Some tests may fail.
More information about the lldb-commits
mailing list