[ORC] Show JITDylib search order in JITDylib::dump.
authorLang Hames <lhames@gmail.com>
Tue, 23 Oct 2018 01:36:32 +0000 (01:36 +0000)
committerLang Hames <lhames@gmail.com>
Tue, 23 Oct 2018 01:36:32 +0000 (01:36 +0000)
This can be helpful in debugging search-order related failures.

llvm-svn: 344994

llvm/lib/ExecutionEngine/Orc/Core.cpp

index 6c7a952..df4d002 100644 (file)
@@ -1381,6 +1381,10 @@ void JITDylib::dump(raw_ostream &OS) {
     OS << "JITDylib \"" << JITDylibName
        << "\" (ES: " << format("0x%016x", reinterpret_cast<uintptr_t>(&ES))
        << "):\n"
+       << "Search order: [";
+    for (auto *JD : SearchOrder)
+      OS << " \"" << JD->getName() << "\"";
+    OS << " ]\n"
        << "Symbol table:\n";
 
     for (auto &KV : Symbols) {