Skip to content

Commit 94cb105

Browse files
authored
[ORC] Initialize the native target in ReOptimize unit test. (#172955)
The ReOptimize unit test was accidentally depending on native target initialization in previous tests, causing it to be skipped if run on its own (using --gtest_filter). Calling OrcNativeTarget::initialize() in the SetUp method of the test fixes this.
1 parent 32243a5 commit 94cb105

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/unittests/ExecutionEngine/Orc/ReOptimizeLayerTest.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ class ReOptimizeLayerTest : public testing::Test {
3434

3535
protected:
3636
void SetUp() override {
37+
38+
OrcNativeTarget::initialize();
39+
3740
auto JTMB = JITTargetMachineBuilder::detectHost();
3841
// Bail out if we can not detect the host.
3942
if (!JTMB) {

0 commit comments

Comments
 (0)