From: Chandler Carruth Date: Wed, 31 Jul 2013 11:14:13 +0000 (+0000) Subject: With help from chapuni on IRC, I think this is right now. =] The issue X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0ad975ef4381959ab8aa6c411a63b66d57f08075;p=clang With help from chapuni on IRC, I think this is right now. =] The issue is that the command is quoted differently from the arguments. The command has '\' and the argument has '\\'. This is made unclear because FileCheck escapes the single matched '\' when it prints the contents of the variable, thus fooling me into thinking it had matched '\\' as intended. The solution is to bind the gcc_install variable in the argument list rather than out of the command. To do so we also have to be a bit more careful so that we don't get stray other things into the '.*' regex. Also, because of the argument difference, '\\\\' is the correct formulation before crtbegin, go back to that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187489 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Driver/cross-linux.c b/test/Driver/cross-linux.c index 464909d607..3013d80f4c 100644 --- a/test/Driver/cross-linux.c +++ b/test/Driver/cross-linux.c @@ -31,10 +31,10 @@ // RUN: | FileCheck --check-prefix=CHECK-MULTI32-I386 %s // CHECK-MULTI32-I386: "-cc1" "-triple" "i386-unknown-linux" // CHECK-MULTI32-I386: "{{.*}}/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/bin{{/|\\}}as" "--32" -// CHECK-MULTI32-I386: "[[gcc_install:.*/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0]]/../../../../i386-unknown-linux/bin{{/|\\}}ld" +// CHECK-MULTI32-I386: "{{.*}}/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/bin{{/|\\}}ld" // CHECK-MULTI32-I386: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]" // CHECK-MULTI32-I386: "-m" "elf_i386" -// CHECK-MULTI32-I386: "{{.*/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0}}{{/|\\}}crtbegin.o" +// CHECK-MULTI32-I386: "crti.o" "[[gcc_install:.*/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0]]{{/|\\\\}}crtbegin.o" // CHECK-MULTI32-I386: "-L[[gcc_install]]" // CHECK-MULTI32-I386: "-L[[gcc_install]]/../../../../i386-unknown-linux/lib/../lib32" // CHECK-MULTI32-I386: "-L[[gcc_install]]/../../../../i386-unknown-linux/lib" @@ -48,10 +48,10 @@ // RUN: | FileCheck --check-prefix=CHECK-MULTI32-X86-64 %s // CHECK-MULTI32-X86-64: "-cc1" "-triple" "x86_64-unknown-linux" // CHECK-MULTI32-X86-64: "{{.*}}/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/bin{{/|\\}}as" "--64" -// CHECK-MULTI32-X86-64: "[[gcc_install:.*/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0]]/../../../../i386-unknown-linux/bin{{/|\\}}ld" +// CHECK-MULTI32-X86-64: "{{.*}}/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/bin{{/|\\}}ld" // CHECK-MULTI32-X86-64: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]" // CHECK-MULTI32-X86-64: "-m" "elf_x86_64" -// CHECK-MULTI32-X86-64: "[[gcc_install]]/64{{/|\\}}crtbegin.o" +// CHECK-MULTI32-X86-64: "crti.o" "[[gcc_install:.*/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0]]/64{{/|\\\\}}crtbegin.o" // CHECK-MULTI32-X86-64: "-L[[gcc_install]]/64" // CHECK-MULTI32-X86-64: "-L[[gcc_install]]/../../../../i386-unknown-linux/lib/../lib64" // CHECK-MULTI32-X86-64: "-L[[gcc_install]]" @@ -66,10 +66,10 @@ // RUN: | FileCheck --check-prefix=CHECK-MULTI64-I386 %s // CHECK-MULTI64-I386: "-cc1" "-triple" "i386-unknown-linux" // CHECK-MULTI64-I386: "{{.*}}/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/bin{{/|\\}}as" "--32" -// CHECK-MULTI64-I386: "[[gcc_install:.*/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0]]/../../../../x86_64-unknown-linux/bin{{/|\\}}ld" +// CHECK-MULTI64-I386: "{{.*}}/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/bin{{/|\\}}ld" // CHECK-MULTI64-I386: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]" // CHECK-MULTI64-I386: "-m" "elf_i386" -// CHECK-MULTI64-I386: "[[gcc_install]]/32{{/|\\}}crtbegin.o" +// CHECK-MULTI64-I386: "crti.o" "[[gcc_install:.*/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0]]/32{{/|\\\\}}crtbegin.o" // CHECK-MULTI64-I386: "-L[[gcc_install]]/32" // CHECK-MULTI64-I386: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib/../lib32" // CHECK-MULTI64-I386: "-L[[gcc_install]]" @@ -84,10 +84,10 @@ // RUN: | FileCheck --check-prefix=CHECK-MULTI64-X86-64 %s // CHECK-MULTI64-X86-64: "-cc1" "-triple" "x86_64-unknown-linux" // CHECK-MULTI64-X86-64: "{{.*}}/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/bin{{/|\\}}as" "--64" -// CHECK-MULTI64-X86-64: "[[gcc_install:.*/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0]]/../../../../x86_64-unknown-linux/bin{{/|\\}}ld" +// CHECK-MULTI64-X86-64: "{{.*}}/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/bin{{/|\\}}ld" // CHECK-MULTI64-X86-64: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]" // CHECK-MULTI64-X86-64: "-m" "elf_x86_64" -// CHECK-MULTI64-X86-64: "[[gcc_install]]{{/|\\}}crtbegin.o" +// CHECK-MULTI64-X86-64: "crti.o" "[[gcc_install:.*/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0]]{{/|\\\\}}crtbegin.o" // CHECK-MULTI64-X86-64: "-L[[gcc_install]]" // CHECK-MULTI64-X86-64: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib/../lib64" // CHECK-MULTI64-X86-64: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib"