[PATCH] D117933: [ELF] Don't consider directories of the same name as libraries

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 21 20:19:01 PST 2022


MaskRay requested changes to this revision.
MaskRay added subscribers: bd1976llvm, ikudrin.
MaskRay added a comment.
This revision now requires changes to proceed.

The code move to `Driver.h` feels a bit uneasy, hope someone may suggest whether there is a better way.

@bd1976llvm @ikudrin



================
Comment at: lld/ELF/Driver.h:100
+template <typename FuncTy> bool searchLibrary(StringRef name, FuncTy func) {
+  llvm::TimeTraceScope timeScope("Locate library", name);
+  if (name.startswith(":"))
----------------
This change should be made separately.


================
Comment at: lld/ELF/Driver.h:110
+template <typename FuncTy> bool searchScript(StringRef name, FuncTy func) {
+  if (func(name))
+    return true;
----------------
`return func(name) || findFromSearchPaths(name, func);`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117933



More information about the llvm-commits mailing list