Skip to content

Commit

Permalink
[ORC] Add JITDylib name to debugging output when defining symbols.
Browse files Browse the repository at this point in the history
  • Loading branch information
lhames committed Apr 1, 2020
1 parent 123a532 commit 53e2380
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions llvm/include/llvm/ExecutionEngine/Orc/Core.h
Expand Up @@ -1309,11 +1309,14 @@ Error JITDylib::define(std::unique_ptr<MaterializationUnitType> &&MU) {
if (MU->getSymbols().empty()) {
// Empty MUs are allowable but pathological, so issue a warning.
DEBUG_WITH_TYPE("orc", {
dbgs() << "Warning: Discarding empty MU " << MU->getName() << "\n";
dbgs() << "Warning: Discarding empty MU " << MU->getName() << " for "
<< getName() << "\n";
});
return Error::success();
} else
DEBUG_WITH_TYPE("orc", dbgs() << "Defining MU " << MU->getName() << ":\n");
DEBUG_WITH_TYPE("orc", {
dbgs() << "Defining MU " << MU->getName() << " for " << getName() << "\n";
});

return ES.runSessionLocked([&, this]() -> Error {
if (auto Err = defineImpl(*MU))
Expand All @@ -1340,11 +1343,14 @@ Error JITDylib::define(std::unique_ptr<MaterializationUnitType> &MU) {
if (MU->getSymbols().empty()) {
// Empty MUs are allowable but pathological, so issue a warning.
DEBUG_WITH_TYPE("orc", {
dbgs() << "Warning: Discarding empty MU " << MU->getName() << "\n";
dbgs() << "Warning: Discarding empty MU " << MU->getName() << getName()
<< "\n";
});
return Error::success();
} else
DEBUG_WITH_TYPE("orc", dbgs() << "Defining MU " << MU->getName() << ":\n");
DEBUG_WITH_TYPE("orc", {
dbgs() << "Defining MU " << MU->getName() << " for " << getName() << "\n";
});

return ES.runSessionLocked([&, this]() -> Error {
if (auto Err = defineImpl(*MU))
Expand Down

0 comments on commit 53e2380

Please sign in to comment.