[lld] r238683 - COFF: /libpath should not take precedence over the current directory.

Rui Ueyama ruiu at google.com
Fri Jun 19 14:49:07 PDT 2015


Fixed in r240180.

On Fri, Jun 19, 2015 at 2:36 PM, Rui Ueyama <ruiu at google.com> wrote:

> Right. I don't know why I believed that I needed to add a new path at
> beginning of the list... Fixing.
>
> On Fri, Jun 19, 2015 at 2:15 PM, Peter Collingbourne <peter at pcc.me.uk>
> wrote:
>
>> On Sun, May 31, 2015 at 08:20:38PM -0000, Rui Ueyama wrote:
>> > Author: ruiu
>> > Date: Sun May 31 15:20:37 2015
>> > New Revision: 238683
>> >
>> > URL: http://llvm.org/viewvc/llvm-project?rev=238683&view=rev
>> > Log:
>> > COFF: /libpath should not take precedence over the current directory.
>> >
>> > Modified:
>> >     lld/trunk/COFF/Driver.cpp
>> >
>> > Modified: lld/trunk/COFF/Driver.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Driver.cpp?rev=238683&r1=238682&r2=238683&view=diff
>> >
>> ==============================================================================
>> > --- lld/trunk/COFF/Driver.cpp (original)
>> > +++ lld/trunk/COFF/Driver.cpp Sun May 31 15:20:37 2015
>> > @@ -209,9 +209,11 @@ bool LinkerDriver::link(int Argc, const
>> >    Config->MachineType = MTOrErr.get();
>> >
>> >    // Handle /libpath
>> > -  // (Inserting at front of a vector is okay because it's short.)
>> > -  for (auto *Arg : Args->filtered(OPT_libpath))
>> > -    SearchPaths.insert(SearchPaths.begin(), Arg->getValue());
>> > +  for (auto *Arg : Args->filtered(OPT_libpath)) {
>> > +    // Inserting at front of a vector is okay because it's short.
>> > +    // +1 because the first entry is always "." (current directory).
>> > +    SearchPaths.insert(SearchPaths.begin() + 1, Arg->getValue());
>>
>> I think this will add search paths in reverse order.
>>
>> Thanks,
>> --
>> Peter
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150619/42b436ed/attachment.html>


More information about the llvm-commits mailing list