[PATCH] D80677: [lld-macho] Handle framework search path, alongside library search path
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 17 20:31:07 PDT 2020
int3 added inline comments.
================
Comment at: lld/MachO/Driver.cpp:115
-static std::vector<StringRef> getSearchPaths(opt::InputArgList &args) {
- std::vector<StringRef> ret{args::getStrings(args, OPT_L)};
- if (!args.hasArg(OPT_Z)) {
- ret.push_back("/usr/lib");
- ret.push_back("/usr/local/lib");
+static bool isDirectory(const StringRef &option, const StringRef &path) {
+ if (!fs::exists(path)) {
----------------
nit: I think these make more sense as plain StringRefs instead of `StringRef &` since a ref-of-ref doesn't really seem useful
================
Comment at: lld/MachO/Driver.cpp:144
+ opt::InputArgList &args) {
+ SmallVector<StringRef, 2> systemPaths = {"/usr/lib", "/usr/local/lib"};
+ getSearchPaths(paths, OPT_L, args, systemPaths);
----------------
nit: this can just a ctor call instead of an assignment
(actually the local variable itself isn't necessary if we take the parameter by const ref)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80677/new/
https://reviews.llvm.org/D80677
More information about the llvm-commits
mailing list