[PATCH] D50475: ELF: Only add libcall symbols to the link if defined in bitcode.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 8 14:42:31 PDT 2018
pcc added inline comments.
================
Comment at: lld/ELF/Driver.cpp:1221
+
+ MemoryBufferRef MB;
+ if (auto *LO = dyn_cast<LazyObject>(Sym))
----------------
ruiu wrote:
> Is it too expensive or is there any problem if we simply call `Sym->fetch()` and see if the returned value is of BitcodeFile (and if so, add to the symbol table)?
I don't think that would work because subsequent calls to `fetch` would return nullptr. That means that if the object file actually turns out to be required, we wouldn't end up adding it.
Repository:
rL LLVM
https://reviews.llvm.org/D50475
More information about the llvm-commits
mailing list