[PATCH] D25495: [ThinLTO] Avoid archive member collisions
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 12 12:37:22 PDT 2016
davide added a comment.
In https://reviews.llvm.org/D25495#568522, @pcc wrote:
> In https://reviews.llvm.org/D25495#568493, @ruiu wrote:
>
> > I'm wondering if InputFile::getName() should return a unique name, such as "some/path/foobar.a:123:x.o" where 123 is an offset in the archive.
>
>
> That might be something we could do in `lld::elf::getFilename()`. It could be confusing in the normal case, so maybe we could do it only if the archive contains duplicate names?
Maybe, but I still think the change belongs to a different patch
================
Comment at: ELF/InputFiles.cpp:491
Ret.getBuffer());
-
- return Ret;
+ return {Ret, C.getChildOffset()};
}
----------------
pcc wrote:
> If this is a thin archive, I don't think `getChildOffset` will give us the right value (looking at the implementation, it appears that it will return a garbage value for thin archive members). Maybe return 0 if thin?
Oh yeah, good catch.
https://reviews.llvm.org/D25495
More information about the llvm-commits
mailing list