[llvm] 1d657cf - [ORC] Initialize native target in JITLinkRedirectionManagerTest test fixture.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 1 21:10:09 PDT 2024


Author: Lang Hames
Date: 2024-11-02T15:09:48+11:00
New Revision: 1d657cfeac4a040acfff249d43ca6987b8a05281

URL: https://github.com/llvm/llvm-project/commit/1d657cfeac4a040acfff249d43ca6987b8a05281
DIFF: https://github.com/llvm/llvm-project/commit/1d657cfeac4a040acfff249d43ca6987b8a05281.diff

LOG: [ORC] Initialize native target in JITLinkRedirectionManagerTest test fixture.

The native target must be initialized here otherwise the test will be skipped
unless some prior test happens to initialize it. Failure to initialize the
native target was causing the test to be skipped when --gtest_filter was used.

Added: 
    

Modified: 
    llvm/unittests/ExecutionEngine/Orc/JITLinkRedirectionManagerTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/ExecutionEngine/Orc/JITLinkRedirectionManagerTest.cpp b/llvm/unittests/ExecutionEngine/Orc/JITLinkRedirectionManagerTest.cpp
index b630b72ef70816..ea8d4fa12daaac 100644
--- a/llvm/unittests/ExecutionEngine/Orc/JITLinkRedirectionManagerTest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/JITLinkRedirectionManagerTest.cpp
@@ -26,6 +26,8 @@ class JITLinkRedirectionManagerTest : public testing::Test {
 
 protected:
   void SetUp() override {
+    OrcNativeTarget::initialize();
+
     auto JTMB = JITTargetMachineBuilder::detectHost();
     // Bail out if we can not detect the host.
     if (!JTMB) {


        


More information about the llvm-commits mailing list