[llvm] [orc-rt] Fix unused variable warning in unit test. (PR #226139)

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 05:25:39 PDT 2026


https://github.com/lhames updated https://github.com/llvm/llvm-project/pull/226139

>From 39cc9e55966c5ea35e42758ef06e8a540d6733b3 Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Thu, 24 Sep 2026 21:48:50 +1000
Subject: [PATCH 1/2] [orc-rt] Fix unused variable warning in unit test.

Fix a clang warning about RTTIName being unused in
ORC_RT_ENABLE_EXCEPTIONS=Off builds.
---
 orc-rt/test/unit/support/ErrorExceptionInteropTest.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/orc-rt/test/unit/support/ErrorExceptionInteropTest.cpp b/orc-rt/test/unit/support/ErrorExceptionInteropTest.cpp
index bc885cceeadbb..0ad3e62bb0fd4 100644
--- a/orc-rt/test/unit/support/ErrorExceptionInteropTest.cpp
+++ b/orc-rt/test/unit/support/ErrorExceptionInteropTest.cpp
@@ -18,6 +18,8 @@
 
 using namespace orc_rt;
 
+#if ORC_RT_ENABLE_EXCEPTIONS
+
 namespace {
 
 class CustomError : public ErrorExtends<CustomError, ErrorInfoBase> {
@@ -29,8 +31,7 @@ class CustomError : public ErrorExtends<CustomError, ErrorInfoBase> {
 
 } // namespace
 
-#if ORC_RT_ENABLE_EXCEPTIONS
-#define EXCEPTION_TEST(X)                                                      \
+#define EXCEPTION_TEST(X)                                               \
   do {                                                                         \
     X;                                                                         \
   } while (false)

>From 76c5ef724554abb83d845d8a763f068be7e480b0 Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Thu, 24 Sep 2026 22:25:18 +1000
Subject: [PATCH 2/2] clang-format

---
 orc-rt/test/unit/support/ErrorExceptionInteropTest.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/orc-rt/test/unit/support/ErrorExceptionInteropTest.cpp b/orc-rt/test/unit/support/ErrorExceptionInteropTest.cpp
index 0ad3e62bb0fd4..1f1ce1086daba 100644
--- a/orc-rt/test/unit/support/ErrorExceptionInteropTest.cpp
+++ b/orc-rt/test/unit/support/ErrorExceptionInteropTest.cpp
@@ -31,7 +31,7 @@ class CustomError : public ErrorExtends<CustomError, ErrorInfoBase> {
 
 } // namespace
 
-#define EXCEPTION_TEST(X)                                               \
+#define EXCEPTION_TEST(X)                                                      \
   do {                                                                         \
     X;                                                                         \
   } while (false)



More information about the llvm-commits mailing list