[llvm] [orc-rt] Check HandlerRan flag in unit test. (PR #221406)

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 4 23:41:49 PDT 2026


https://github.com/lhames created https://github.com/llvm/llvm-project/pull/221406

Verifies that the expected catch handler ran, and eliminates an unused variable warning.

>From 84b2cf4e301ddcb1fc80e0c97902d3ae14a9077c Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Sat, 5 Sep 2026 06:31:30 +0000
Subject: [PATCH] [orc-rt] Check HandlerRan flag in unit test.

Verifies that the expected catch handler ran, and eliminates an unused
variable warning.
---
 orc-rt/test/unit/support/ErrorExceptionInteropTest.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/orc-rt/test/unit/support/ErrorExceptionInteropTest.cpp b/orc-rt/test/unit/support/ErrorExceptionInteropTest.cpp
index 34f1843b523d0..d1d6e7a25f2e6 100644
--- a/orc-rt/test/unit/support/ErrorExceptionInteropTest.cpp
+++ b/orc-rt/test/unit/support/ErrorExceptionInteropTest.cpp
@@ -171,6 +171,8 @@ TEST(ErrorExceptionInteropTest, ThrowErrorAndCatchAsException) {
     } catch (...) {
       ADD_FAILURE() << "Caught unexpected error type";
     }
+
+    EXPECT_TRUE(HandlerRan) << "Handler never ran";
   });
 }
 



More information about the llvm-commits mailing list