[PATCH] D66355: [COFF] Add libcall symbols to the link when LTO is being used.
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 20 11:35:08 PDT 2019
rnk requested changes to this revision.
rnk added a comment.
This revision now requires changes to proceed.
lgtm
================
Comment at: lld/COFF/SymbolTable.cpp:594
+ MemoryBufferRef mb = l->getMemberBuffer();
+ if (identify_magic(mb.getBuffer()) == llvm::file_magic::bitcode)
+ addUndefined(sym->getName());
----------------
akhuang wrote:
> rnk wrote:
> > I'd use `isa<BitcodeFile>(l->getFile())` instead, rather than checking for the magic bytes again.
> It seems like `isa<BitcodeFile>(l->getFile())` is always false and the file is an ArchiveFile?
I see, you're right. I see this is also what is done for ELF. The whole idea of a lazy symbol is that we may not have loaded the object file yet.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66355/new/
https://reviews.llvm.org/D66355
More information about the llvm-commits
mailing list