[ORC] Temporarily adding some redundant asserts / debug output to aid in

debugging a tester failure.

llvm-svn: 321920
This commit is contained in:
Lang Hames 2018-01-06 01:06:07 +00:00
parent c2ba9059d0
commit 0f74d273b0
2 changed files with 15 additions and 0 deletions

View File

@ -40,14 +40,28 @@ void AsynchronousSymbolQuery::setDefinition(SymbolStringPtr Name,
if (OutstandingResolutions == 0)
return;
assert(NotifySymbolsResolved && "Notify callback not set");
errs()
<< "OutstandingResolutions = " << OutstandingResolutions << "\n"
<< "OutstandingFinalizations = " << OutstandingFinalizations << "\n"
<< "Symbols.size() = " << Symbols.size() << "\n"
<< "Symbols.count(Name) = " << Symbols.count(Name) << "\n";
assert(!Symbols.count(Name) &&
"Symbol has already been assigned an address");
errs() << "Past assert\n";
Symbols.insert(std::make_pair(std::move(Name), std::move(Sym)));
errs() << "Past insert\n";
--OutstandingResolutions;
errs() << "Past subtract\n";
if (OutstandingResolutions == 0) {
errs() << "Past test\n";
NotifySymbolsResolved(std::move(Symbols));
// Null out NotifySymbolsResolved to indicate that we've already called it.
errs() << "Past callback\n";
NotifySymbolsResolved = {};
errs() << "Past callback-reset\n";
}
}

View File

@ -45,6 +45,7 @@ TEST(CoreAPIsTest, AsynchronousSymbolQuerySuccessfulResolutionOnly) {
EXPECT_TRUE(OnResolutionRun) << "OnResolutionCallback was not run";
EXPECT_FALSE(OnReadyRun) << "OnReady unexpectedly run";
errs() << "Exiting test\n";
}
}