[llvm] c15218b - [JITLink] Dump weak-ref status for external symbols in LinkGraphs.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 25 09:41:00 PDT 2024


Author: Lang Hames
Date: 2024-03-25T11:40:51-05:00
New Revision: c15218bccb570316e4971c4b70e879a4bd6a8de9

URL: https://github.com/llvm/llvm-project/commit/c15218bccb570316e4971c4b70e879a4bd6a8de9
DIFF: https://github.com/llvm/llvm-project/commit/c15218bccb570316e4971c4b70e879a4bd6a8de9.diff

LOG: [JITLink] Dump weak-ref status for external symbols in LinkGraphs.

Coding my way home: 8.98112N, 79.52094W

Added: 
    

Modified: 
    llvm/lib/ExecutionEngine/JITLink/JITLink.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ExecutionEngine/JITLink/JITLink.cpp b/llvm/lib/ExecutionEngine/JITLink/JITLink.cpp
index 7f743dba60a934..b103a9ca98e189 100644
--- a/llvm/lib/ExecutionEngine/JITLink/JITLink.cpp
+++ b/llvm/lib/ExecutionEngine/JITLink/JITLink.cpp
@@ -338,7 +338,8 @@ void LinkGraph::dump(raw_ostream &OS) {
   OS << "\nExternal symbols:\n";
   if (!external_symbols().empty()) {
     for (auto *Sym : external_symbols())
-      OS << "  " << Sym->getAddress() << ": " << *Sym << "\n";
+      OS << "  " << Sym->getAddress() << ": " << *Sym
+         << (Sym->isWeaklyReferenced() ? " (weakly referenced)" : "") << "\n";
   } else
     OS << "  none\n";
 }


        


More information about the llvm-commits mailing list