brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 41d6989 Raw
38 lines · c
1// REQUIRES: x86-registered-target2// RUN: rm -rf %t.cdb3// RUN: %clang -target x86_64-apple-macos10.15 -c %s -o -  -gen-cdb-fragment-path %t.cdb4// RUN: ls %t.cdb | FileCheck --check-prefix=CHECK-LS %s5// CHECK-LS: gen-cdb-fragment.c.{{.*}}.json6 7// RUN: cat %t.cdb/*.json | FileCheck --check-prefix=CHECK %s8// CHECK: { "directory": "{{.*}}", "file": "{{.*}}gen-cdb-fragment.c", "output": "-", "arguments": [{{.*}}, "--target=x86_64-apple-macos10.15"{{.*}}]},9// RUN: cat %t.cdb/*.json | FileCheck --check-prefix=CHECK-FLAG %s10// CHECK-FLAG-NOT: -gen-cdb-fragment-path11 12// RUN: rm -rf %t.cdb13// RUN: mkdir %t.cdb14// RUN: ls %t.cdb | not FileCheck --check-prefix=CHECK-LS %s15// RUN: %clang -target x86_64-apple-macos10.15 -S %s -o -  -gen-cdb-fragment-path %t.cdb16// RUN: ls %t.cdb | FileCheck --check-prefix=CHECK-LS %s17 18// Working directory arg is respected.19// RUN: rm -rf %t.cdb20// RUN: mkdir %t.cdb21// RUN: %clang -target x86_64-apple-macos10.15 -working-directory %t.cdb -c %s -o -  -gen-cdb-fragment-path "."22// RUN: ls %t.cdb | FileCheck --check-prefix=CHECK-LS %s23// RUN: cat %t.cdb/*.json | FileCheck --check-prefix=CHECK-CWD %s24// CHECK-CWD: "directory": "{{.*}}.cdb"25 26// -### does not emit the CDB fragment27// RUN: rm -rf %t.cdb28// RUN: mkdir %t.cdb29// RUN: %clang -target x86_64-apple-macos10.15 -S %s -o -  -gen-cdb-fragment-path %t.cdb -###30// RUN: ls %t.cdb | not FileCheck --check-prefix=CHECK-LS %s31 32// -MJ is preferred over -gen-cdb-fragment-path33// RUN: rm -rf %t.cdb34// RUN: mkdir %t.cdb35// RUN: %clang -target x86_64-apple-macos10.15 -S %s -o -  -gen-cdb-fragment-path %t.cdb -MJ %t.out36// RUN: ls %t.cdb | not FileCheck --check-prefix=CHECK-LS %s37// RUN: FileCheck %s < %t.out38