r288827 - Allow additional output since e.g. OSX appends flags like

Joerg Sonnenberger via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 6 09:02:41 PST 2016


Author: joerg
Date: Tue Dec  6 11:02:41 2016
New Revision: 288827

URL: http://llvm.org/viewvc/llvm-project?rev=288827&view=rev
Log:
Allow additional output since e.g. OSX appends flags like
"-mlinker-version=264.3.102" automatically. Wiring down a target on the
other hand is problematic as this actually needs to run codegen and
doesn't work with -###.

Modified:
    cfe/trunk/test/Driver/compilation_database.c

Modified: cfe/trunk/test/Driver/compilation_database.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/compilation_database.c?rev=288827&r1=288826&r2=288827&view=diff
==============================================================================
--- cfe/trunk/test/Driver/compilation_database.c (original)
+++ cfe/trunk/test/Driver/compilation_database.c Tue Dec  6 11:02:41 2016
@@ -1,8 +1,8 @@
 // RUN: %clang -MD -MP --sysroot=somewhere -c -x c %s -xc++ %s -Wall -MJ - 2>&1 | FileCheck %s
 // RUN: not %clang -c -x c %s -MJ %s/non-existant 2>&1 | FileCheck --check-prefix=ERROR %s
 
-// CHECK: { "directory": "[[CWD:[^"]+]]",  "file": "[[SRC:[^"]+[/|\\]compilation_database.c]]", "output": "compilation_database.o", "arguments": ["{{[^"]*}}clang{{[^"]*}}", "-xc", "[[SRC]]", "--sysroot=somewhere", "-c", "-Wall", "--target={{[^"]+}}"]},
-// CHECK: { "directory": "[[CWD:[^"]+]]",  "file": "[[SRC:[^"]+[/|\\]compilation_database.c]]", "output": "compilation_database.o", "arguments": ["{{[^"]*}}clang{{[^"]*}}", "-xc++", "[[SRC]]", "--sysroot=somewhere", "-c", "-Wall", "--target={{[^"]+}}"]},
+// CHECK: { "directory": "[[CWD:[^"]+]]",  "file": "[[SRC:[^"]+[/|\\]compilation_database.c]]", "output": "compilation_database.o", "arguments": ["{{[^"]*}}clang{{[^"]*}}", "-xc", "[[SRC]]", "--sysroot=somewhere", "-c", "-Wall",.* "--target={{[^"]+}}"]},
+// CHECK: { "directory": "[[CWD:[^"]+]]",  "file": "[[SRC:[^"]+[/|\\]compilation_database.c]]", "output": "compilation_database.o", "arguments": ["{{[^"]*}}clang{{[^"]*}}", "-xc++", "[[SRC]]", "--sysroot=somewhere", "-c", "-Wall",.* "--target={{[^"]+}}"]},
 // ERROR: error: compilation database '{{.*}}/non-existant' could not be opened:
 
 int main(void) {




More information about the cfe-commits mailing list