r219464 - Hopefully fixes test failures for msvc.
Dan Albert
danalbert at google.com
Thu Oct 9 19:26:00 PDT 2014
Author: danalbert
Date: Thu Oct 9 21:26:00 2014
New Revision: 219464
URL: http://llvm.org/viewvc/llvm-project?rev=219464&view=rev
Log:
Hopefully fixes test failures for msvc.
Looks like llvm::sys::path::filename() was canonicalizing my paths
before emitting them for FileCheck to stumble over.
Fix a style nit with r219460 while I'm at it.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/clang_f_opts.c
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=219464&r1=219463&r2=219464&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Oct 9 21:26:00 2014
@@ -3242,8 +3242,7 @@ void Clang::ConstructJob(Compilation &C,
if (Output.isFilename()) {
CmdArgs.push_back("-coverage-file");
SmallString<128> CoverageFilename;
- Arg *FinalOutput = C.getArgs().getLastArg(options::OPT_o);
- if (FinalOutput) {
+ if (Arg *FinalOutput = C.getArgs().getLastArg(options::OPT_o)) {
CoverageFilename = FinalOutput->getValue();
} else {
CoverageFilename = llvm::sys::path::filename(Output.getBaseInput());
Modified: cfe/trunk/test/Driver/clang_f_opts.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang_f_opts.c?rev=219464&r1=219463&r2=219464&view=diff
==============================================================================
--- cfe/trunk/test/Driver/clang_f_opts.c (original)
+++ cfe/trunk/test/Driver/clang_f_opts.c Thu Oct 9 21:26:00 2014
@@ -78,10 +78,10 @@
// RUN: %clang -### -S -fprofile-arcs -no-integrated-as %s -o foo/bar.o 2>&1 | FileCheck -check-prefix=CHECK-GCNO-LOCATION-REL-PATH %s
// RUN: %clang -### -c -fprofile-arcs %s -o foo/bar.o 2>&1 | FileCheck -check-prefix=CHECK-GCNO-LOCATION-REL-PATH %s
// RUN: %clang -### -c -fprofile-arcs -no-integrated-as %s -o foo/bar.o 2>&1 | FileCheck -check-prefix=CHECK-GCNO-LOCATION-REL-PATH %s
-// CHECK-GCNO-DEFAULT-LOCATION: "-coverage-file" "{{.*}}/clang_f_opts.c"
-// CHECK-GCNO-DEFAULT-LOCATION-NOT: "-coverage-file" "/tmp/{{.*}}/clang_f_opts.c"
-// CHECK-GCNO-LOCATION: "-coverage-file" "/foo/bar.o"
-// CHECK-GCNO-LOCATION-REL-PATH: "-coverage-file" "{{.*}}/foo/bar.o"
+// CHECK-GCNO-DEFAULT-LOCATION: "-coverage-file" "{{.*}}{{[/\\]}}clang_f_opts.c"
+// CHECK-GCNO-DEFAULT-LOCATION-NOT: "-coverage-file" "{{[/\\]}}tmp{{[/\\]}}{{.*}}{{[/\\]}}clang_f_opts.c"
+// CHECK-GCNO-LOCATION: "-coverage-file" "{{[/\\]}}foo{{[/\\]}}bar.o"
+// CHECK-GCNO-LOCATION-REL-PATH: "-coverage-file" "{{.*}}{{[/\\]}}foo{{[/\\]}}bar.o"
// RUN: %clang -### -S -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
// RUN: %clang -### -S -fno-vectorize -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
More information about the cfe-commits
mailing list