[IRBuilder] Refactor FMF interface (#121657)
[llvm-project.git] / clang / test / ClangScanDeps / modules-fmodule-name-no-module-built.m
blobcfe29c2bf7cdbb147403a33e3a7389b159ccec18
1 // RUN: rm -rf %t.dir
2 // RUN: rm -rf %t.cdb
3 // RUN: mkdir -p %t.dir
4 // RUN: cp %s %t.dir/modules-fmodule-name-no-module-built.m
5 // RUN: mkdir %t.dir/Inputs
6 // RUN: cp %S/Inputs/header.h %t.dir/Inputs/header.h
7 // RUN: cp %S/Inputs/header2.h %t.dir/Inputs/header2.h
8 // RUN: cp %S/Inputs/header3.h %t.dir/Inputs/header3.h
9 // RUN: cp %S/Inputs/module.modulemap %t.dir/Inputs/module.modulemap
10 // RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/module_fmodule_name_cdb.json > %t.cdb
12 // RUN: clang-scan-deps -compilation-database %t.cdb -j 1 -format experimental-full \
13 // RUN:   -mode preprocess-dependency-directives > %t.result
14 // RUN: cat %t.result | sed 's:\\\\\?:/:g' | FileCheck -DPREFIX=%/t.dir --check-prefixes=CHECK %s
16 #import "header3.h"
17 #import "header.h"
19 // CHECK:      {
20 // CHECK-NEXT:   "modules": [
21 // CHECK-NEXT:     {
22 // CHECK-NEXT:       "clang-module-deps": []
23 // CHECK-NEXT:       "clang-modulemap-file": "[[PREFIX]]/Inputs/module.modulemap",
24 // CHECK-NEXT:       "command-line": [
25 // CHECK:            ],
26 // CHECK-NEXT:       "context-hash": "[[HASH_H2:[A-Z0-9]+]]",
27 // CHECK-NEXT:       "file-deps": [
28 // CHECK-NEXT:         "[[PREFIX]]/Inputs/module.modulemap",
29 // CHECK-NEXT:         "[[PREFIX]]/Inputs/header2.h"
30 // CHECK-NEXT:       ],
31 // CHECK-NEXT:       "link-libraries": [],
32 // CHECK-NEXT:       "name": "header2"
33 // CHECK-NEXT:     }
34 // CHECK-NEXT:   ],
35 // CHECK-NEXT:   "translation-units": [
36 // CHECK-NEXT:     {
37 // CHECK:            "clang-context-hash": "[[HASH_TU:[A-Z0-9]+]]",
38 // CHECK-NEXT:       "clang-module-deps": [
39 // CHECK-NEXT:         {
40 // CHECK-NEXT:           "context-hash": "[[HASH_H2]]",
41 // CHECK-NEXT:           "module-name": "header2"
42 // CHECK-NEXT:         }
43 // CHECK-NEXT:       ],
44 // CHECK-NEXT:       "command-line": [
45 // CHECK:            ],
46 // CHECK:            "file-deps": [
47 // CHECK-NEXT:         "[[PREFIX]]/modules-fmodule-name-no-module-built.m",
48 // CHECK-NEXT:         "[[PREFIX]]/Inputs/header3.h",
49 // CHECK-NEXT:         "[[PREFIX]]/Inputs/header.h"
50 // CHECK-NEXT:       ],
51 // CHECK-NEXT:       "input-file": "[[PREFIX]]/modules-fmodule-name-no-module-built.m"
52 // CHECK-NEXT:     }