Also remove DylibFile::reexported since it's unused.
Fixes llvm.org/PR48393.
Paths
| Differential D93001
[lld-macho] Don't load dylibs more than once ClosedPublic Authored by int3 on Dec 9 2020, 10:36 PM.
Details
Summary Also remove DylibFile::reexported since it's unused. Fixes llvm.org/PR48393.
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Dec 10 2020, 5:46 AM Comment Actions I guess you could add a test to test/MachO/lc-linker-command.s too. It'll pass, it uses the same codepath, but it's a different way to add -framework flags so maybe it's worth testing. smeenai added inline comments.
int3 marked an inline comment as done. Comment Actionstest LC_LINKER_OPTION, use CachedHashStringRef
This revision was landed with ongoing or failed builds.Dec 10 2020, 3:58 PM Closed by commit rG76c36c11a9c6: [lld-macho] Don't load dylibs more than once (authored by int3). · Explain Why This revision was automatically updated to reflect the committed changes. Comment Actions Now that I look at PR48393 again, this gets -framework CoreFoundation -weak_framework CoreFoundation -framework CoreFoundation wrong: CoreFoundation should be linked weakly in that case, but with this patch I think it doesn't. (Sorry for only noticing after you committed.)
Revision Contents
Diff 311052 lld/MachO/Driver.h
lld/MachO/Driver.cpp
lld/MachO/DriverUtils.cpp
lld/MachO/InputFiles.h
lld/MachO/InputFiles.cpp
lld/test/MachO/dylink.s
lld/test/MachO/implicit-dylibs.s
lld/test/MachO/lc-linker-option.ll
|
StringSet copies all the strings you add to it. I don't think that's a huge deal for this use case, but just something to keep in mind if this ever starts showing up in profiles.
(A SmallSet of StringRef would avoid the copying, but you'd rehash all the strings whenever you grew the set. A SmallSet of CachedHashStringRef would avoid both the copying and the rehashing, but it feels kinda overkill?)