[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
Mon Jan 24 10:12:47 PST 2022
MaskRay added a comment.
In D117933#3263929 <https://reviews.llvm.org/D117933#3263929>, @phosek wrote:
> In D117933#3263111 <https://reviews.llvm.org/D117933#3263111>, @MaskRay wrote:
>
>> The code move to `Driver.h` feels a bit uneasy, hope someone may suggest whether there is a better way.
>>
>> @arichardson @bd1976llvm @ikudrin
>>
>> The functionality looks good and I am happy to LG if we can't think of a better way.
>
> I also considered keeping the functions in `DriverUtils.cpp` and change the argument to take `std::function<bool(StringRef)>`. It is less efficient than the template argument, but these functions aren't on a critical path so that's probably not an issue. Would that be preferable?
Function definitions remaining in .cpp looks fine. You may use `llvm::function_ref<bool(llvm::StringRef)>` instead of `std::function` (which needs heap allocation).
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