[PATCH] D113073: [lld-macho] Cache library paths from findLibrary
    Vy Nguyen via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Nov  2 18:36:18 PDT 2021
    
    
  
oontvoo added inline comments.
================
Comment at: lld/MachO/Driver.cpp:85-106
+  CachedHashStringRef key(name);
+  auto entry = resolvedLibraries.find(key);
+  if (entry != resolvedLibraries.end())
+    return entry->second;
+
   if (config->searchDylibsFirst) {
     if (Optional<StringRef> path = findPathCombination(
----------------
================
Comment at: lld/MachO/Driver.cpp:104
+                                  {".tbd", ".dylib", ".a"});
+  resolvedLibraries[key] = *path;
+  return path;
----------------
should check `if(path)` first?
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113073/new/
https://reviews.llvm.org/D113073
    
    
More information about the llvm-commits
mailing list