[lld] r268258 - Quote arguments for --reproduce.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Mon May 2 11:52:23 PDT 2016


Thanks!

On 2 May 2016 at 13:34, Rui Ueyama via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Author: ruiu
> Date: Mon May  2 12:34:17 2016
> New Revision: 268258
>
> URL: http://llvm.org/viewvc/llvm-project?rev=268258&view=rev
> Log:
> Quote arguments for --reproduce.
>
> Modified:
>     lld/trunk/ELF/DriverUtils.cpp
>     lld/trunk/test/ELF/reproduce.s
>
> Modified: lld/trunk/ELF/DriverUtils.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/DriverUtils.cpp?rev=268258&r1=268257&r2=268258&view=diff
> ==============================================================================
> --- lld/trunk/ELF/DriverUtils.cpp (original)
> +++ lld/trunk/ELF/DriverUtils.cpp Mon May  2 12:34:17 2016
> @@ -181,7 +181,10 @@ void elf::createResponseFile(const llvm:
>           << quote(rewritePath(Arg->getValue())) << "\n";
>        break;
>      default:
> -      OS << Arg->getAsString(Args) << "\n";
> +      OS << Arg->getSpelling();
> +      if (Arg->getNumValues() > 0)
> +        OS << " " << quote(Arg->getValue());
> +      OS << "\n";
>      }
>    }
>  }
>
> Modified: lld/trunk/test/ELF/reproduce.s
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/reproduce.s?rev=268258&r1=268257&r2=268258&view=diff
> ==============================================================================
> --- lld/trunk/test/ELF/reproduce.s (original)
> +++ lld/trunk/test/ELF/reproduce.s Mon May  2 12:34:17 2016
> @@ -22,12 +22,14 @@
>  # RUN: diff %t.dir/build2/foo.o repro/%:t.dir/build2/foo.o
>
>  # RUN: touch file
> -# RUN: not ld.lld --reproduce repro2 'foo bar' -L"foo bar" -Lfile -version-script file
> +# RUN: not ld.lld --reproduce repro2 'foo bar' -L"foo bar" -Lfile -version-script file \
> +# RUN:   --dynamic-linker "some unusual/path"
>  # RUN: FileCheck %s --check-prefix=RSP2 < repro2/response.txt
>  # RSP2:      "foo bar"
>  # RSP2-NEXT: -L "foo bar"
>  # RSP2-NEXT: -L {{.+}}file
>  # RSP2-NEXT: -version-script {{.+}}file
> +# RSP2-NEXT: --dynamic-linker "some unusual/path"
>
>  # RUN: not ld.lld build1/foo.o -o bar -shared --as-needed --reproduce . 2>&1 \
>  # RUN:   | FileCheck --check-prefix=ERROR %s
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list