summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2018-06-14 15:32:59 +0000
committerLang Hames <lhames@gmail.com>2018-06-14 15:32:59 +0000
commitb7788ebb4a992d7ccd141c91d08e72c18e3158cc (patch)
treef890ef24e8ab73c34abf3eb6da454af8f3f7a2d3 /llvm/unittests/ExecutionEngine
parentbd49fb83aad85924d39df4afd9e946ab4f862efd (diff)
downloadbcm5719-llvm-b7788ebb4a992d7ccd141c91d08e72c18e3158cc.tar.gz
bcm5719-llvm-b7788ebb4a992d7ccd141c91d08e72c18e3158cc.zip
[ORC] Filter out self-dependencies in VSO::addDependencies.
llvm-svn: 334724
Diffstat (limited to 'llvm/unittests/ExecutionEngine')
-rw-r--r--llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp b/llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
index 01f81d9a80f..c8f30dbfd94 100644
--- a/llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
@@ -301,10 +301,17 @@ TEST(CoreAPIsTest, TestCircularDependenceInOneVSO) {
EXPECT_TRUE(Unresolved.empty()) << "Failed to resolve \"Baz\"";
}
+ // Add a circular dependency: Foo -> Bar, Bar -> Baz, Baz -> Foo.
FooR->addDependencies({{&V, SymbolNameSet({Bar})}});
BarR->addDependencies({{&V, SymbolNameSet({Baz})}});
BazR->addDependencies({{&V, SymbolNameSet({Foo})}});
+ // Add self-dependencies for good measure. This tests that the implementation
+ // of addDependencies filters these out.
+ FooR->addDependencies({{&V, SymbolNameSet({Foo})}});
+ BarR->addDependencies({{&V, SymbolNameSet({Bar})}});
+ BazR->addDependencies({{&V, SymbolNameSet({Baz})}});
+
EXPECT_FALSE(FooResolved) << "\"Foo\" should not be resolved yet";
EXPECT_FALSE(BarResolved) << "\"Bar\" should not be resolved yet";
EXPECT_FALSE(BazResolved) << "\"Baz\" should not be resolved yet";
OpenPOWER on IntegriCloud