@@ -518,71 +518,6 @@ TEST_F(CoreAPIsStandardTest, TestTrivialCircularDependency) {
518
518
<< " Self-dependency prevented symbol from being marked ready" ;
519
519
}
520
520
521
- TEST_F (CoreAPIsStandardTest, TestBasicQueryDependenciesReporting) {
522
- // Test that dependencies are reported as expected.
523
-
524
- bool DependenciesCallbackRan = false ;
525
-
526
- std::unique_ptr<MaterializationResponsibility> FooR;
527
- std::unique_ptr<MaterializationResponsibility> BarR;
528
-
529
- cantFail (JD.define (std::make_unique<SimpleMaterializationUnit>(
530
- SymbolFlagsMap ({{Foo, FooSym.getFlags ()}}),
531
- [&](std::unique_ptr<MaterializationResponsibility> R) {
532
- FooR = std::move (R);
533
- })));
534
-
535
- cantFail (JD.define (std::make_unique<SimpleMaterializationUnit>(
536
- SymbolFlagsMap ({{Bar, BarSym.getFlags ()}}),
537
- [&](std::unique_ptr<MaterializationResponsibility> R) {
538
- BarR = std::move (R);
539
- })));
540
-
541
- cantFail (JD.define (std::make_unique<SimpleMaterializationUnit>(
542
- SymbolFlagsMap ({{Baz, BazSym.getFlags ()}}),
543
- [&](std::unique_ptr<MaterializationResponsibility> R) {
544
- cantFail (R->notifyResolved ({{Baz, BazSym}}));
545
- cantFail (R->notifyEmitted ({}));
546
- })));
547
-
548
- // First issue a lookup for Foo and Bar so that we can put them
549
- // into the required states for the test lookup below.
550
- ES.lookup (
551
- LookupKind::Static, makeJITDylibSearchOrder (&JD),
552
- SymbolLookupSet ({Foo, Bar}), SymbolState::Resolved,
553
- [](Expected<SymbolMap> Result) {
554
- EXPECT_THAT_EXPECTED (std::move (Result), Succeeded ());
555
- },
556
- NoDependenciesToRegister);
557
-
558
- cantFail (FooR->notifyResolved ({{Foo, FooSym}}));
559
- cantFail (FooR->notifyEmitted ({}));
560
-
561
- cantFail (BarR->notifyResolved ({{Bar, BarSym}}));
562
-
563
- ES.lookup (
564
- LookupKind::Static, makeJITDylibSearchOrder (&JD),
565
- SymbolLookupSet ({Foo, Bar, Baz}), SymbolState::Resolved,
566
- [](Expected<SymbolMap> Result) {
567
- EXPECT_THAT_EXPECTED (std::move (Result), Succeeded ());
568
- },
569
- [&](const SymbolDependenceMap &Dependencies) {
570
- EXPECT_EQ (Dependencies.size (), 1U )
571
- << " Expect dependencies on only one JITDylib" ;
572
- EXPECT_TRUE (Dependencies.count (&JD))
573
- << " Expect dependencies on JD only" ;
574
- auto &Deps = Dependencies.begin ()->second ;
575
- EXPECT_EQ (Deps.size (), 2U );
576
- EXPECT_TRUE (Deps.count (Bar));
577
- EXPECT_TRUE (Deps.count (Baz));
578
- DependenciesCallbackRan = true ;
579
- });
580
-
581
- cantFail (BarR->notifyEmitted ({}));
582
-
583
- EXPECT_TRUE (DependenciesCallbackRan);
584
- }
585
-
586
521
TEST_F (CoreAPIsStandardTest, TestCircularDependenceInOneJITDylib) {
587
522
// Test that a circular symbol dependency between three symbols in a JITDylib
588
523
// does not prevent any symbol from becoming 'ready' once all symbols are
0 commit comments