From: Joerg Sonnenberger Date: Tue, 6 Dec 2016 17:02:41 +0000 (+0000) Subject: Allow additional output since e.g. OSX appends flags like X-Git-Tag: llvmorg-4.0.0-rc1~2841 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a53561f60ee645cc10a8af53a255bef2a359dc11;p=platform%2Fupstream%2Fllvm.git 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 -###. llvm-svn: 288827 --- diff --git a/clang/test/Driver/compilation_database.c b/clang/test/Driver/compilation_database.c index 15b5f59..765565b 100644 --- a/clang/test/Driver/compilation_database.c +++ b/clang/test/Driver/compilation_database.c @@ -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) {