[JITLink] Add debugging output to print resolved external atoms.
llvm-svn: 359614
diff --git a/llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp b/llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp
index 04a4be1..6cf1d82 100644
--- a/llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp
+++ b/llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp
@@ -345,6 +345,12 @@
A.setAddress(KV.second.getAddress());
}
+ LLVM_DEBUG({
+ dbgs() << "Externals after applying lookup result:\n";
+ for (auto *A : G->external_atoms())
+ dbgs() << " " << A->getName() << ": "
+ << formatv("{0:x16}", A->getAddress()) << "\n";
+ });
assert(llvm::all_of(G->external_atoms(),
[](Atom *A) { return A->getAddress() != 0; }) &&
"All atoms should have been resolved by this point");