[PATCH] D103985: [lld/mac] Print dylib search details with --print-dylib-search or RC_TRACE_DYLIB_SEARCHING

Alexander Shaposhnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 9 13:19:26 PDT 2021


alexshap added inline comments.


================
Comment at: lld/MachO/DriverUtils.cpp:179
 
-Optional<std::string> macho::resolveDylibPath(StringRef path) {
-  // TODO: if a tbd and dylib are both present, we should check to make sure
-  // they are consistent.
-  if (fs::exists(path))
-    return std::string(path);
-  else
+static void searchedDylib(const Twine &path, bool found) {
+  if (config->printDylibSearch)
----------------
perhaps, logDylibSearchResult would be a better name ?
also - maybe use StringRef instead of Twine ?


================
Comment at: lld/MachO/DriverUtils.cpp:192
+  if (dylibExists)
+    return std::string(dylibPath);
+
----------------
dylibPath.str() ?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103985/new/

https://reviews.llvm.org/D103985



More information about the llvm-commits mailing list