[llvm] r184448 - Use only the filename when deciding if a file is a duplicate.

Manuel Klimek klimek at google.com
Fri Jun 21 00:25:55 PDT 2013


I get an order problem with the test on our internal testing
infrastructure. Putting a "sort" in fixes it (submitted fix in r184535).

Thanks,
/Manuel


On Thu, Jun 20, 2013 at 8:30 PM, Rafael Espindola <
rafael.espindola at gmail.com> wrote:

> Author: rafael
> Date: Thu Jun 20 13:30:37 2013
> New Revision: 184448
>
> URL: http://llvm.org/viewvc/llvm-project?rev=184448&view=rev
> Log:
> Use only the filename when deciding if a file is a duplicate.
>
> Matches gnu ar behavior.
>
> Modified:
>     llvm/trunk/test/Archive/directory.ll
>     llvm/trunk/tools/llvm-ar/llvm-ar.cpp
>
> Modified: llvm/trunk/test/Archive/directory.ll
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Archive/directory.ll?rev=184448&r1=184447&r2=184448&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/Archive/directory.ll (original)
> +++ llvm/trunk/test/Archive/directory.ll Thu Jun 20 13:30:37 2013
> @@ -4,7 +4,9 @@
>  ;RUN: rm -f %T/test.a
>  ;RUN: touch %T/a-very-long-file-name
>  ;RUN: llvm-ar r %T/test.a %s %T/a-very-long-file-name
> +;RUN: llvm-ar r %T/test.a %T/a-very-long-file-name
>  ;RUN: llvm-ar t %T/test.a | FileCheck -check-prefix=MEMBERS %s
>  ;MEMBERS-NOT: /
>  ;MEMBERS: a-very-long-file-name
>  ;MEMBERS: directory.ll
> +;MEMBERS-NOT: a-very-long-file-name
>
> Modified: llvm/trunk/tools/llvm-ar/llvm-ar.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-ar/llvm-ar.cpp?rev=184448&r1=184447&r2=184448&view=diff
>
> ==============================================================================
> --- llvm/trunk/tools/llvm-ar/llvm-ar.cpp (original)
> +++ llvm/trunk/tools/llvm-ar/llvm-ar.cpp Thu Jun 20 13:30:37 2013
> @@ -563,7 +563,7 @@ doReplaceOrInsert(std::string* ErrMsg) {
>      std::set<std::string>::iterator found = remaining.end();
>      for (std::set<std::string>::iterator RI = remaining.begin(),
>           RE = remaining.end(); RI != RE; ++RI ) {
> -      std::string compare(*RI);
> +      std::string compare(sys::path::filename(*RI));
>        if (TruncateNames && compare.length() > 15) {
>          const char* nm = compare.c_str();
>          unsigned len = compare.length();
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130621/62dd5014/attachment.html>


More information about the llvm-commits mailing list