File tree Expand file tree Collapse file tree 2 files changed +55
-0
lines changed
lib/Tooling/DependencyScanning Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,9 @@ ModuleDepCollector::makeInvocationForModuleBuildWithoutOutputs(
111
111
CI.getDependencyOutputOpts ().Targets .clear ();
112
112
113
113
CI.getFrontendOpts ().ProgramAction = frontend::GenerateModule;
114
+ CI.getFrontendOpts ().ARCMTAction = FrontendOptions::ARCMT_None;
115
+ CI.getFrontendOpts ().ObjCMTAction = FrontendOptions::ObjCMT_None;
116
+ CI.getFrontendOpts ().MTMigrateDir .clear ();
114
117
CI.getLangOpts ()->ModuleName = Deps.ID .ModuleName ;
115
118
CI.getFrontendOpts ().IsSystemModule = Deps.IsSystem ;
116
119
Original file line number Diff line number Diff line change
1
+ // RUN: rm -rf %t
2
+ // RUN: split-file %s %t
3
+ // RUN: sed -e "s|DIR|%/t|g" %t/cdb1.json.template > %t/cdb1.json
4
+
5
+ // RUN: clang-scan-deps -compilation-database %t/cdb1.json -format experimental-full -mode preprocess-dependency-directives > %t/result1.txt
6
+
7
+ // RUN: FileCheck %s -input-file %t/result1.txt
8
+
9
+ // Verify that secondary actions get stripped, and that there's a single version
10
+ // of module A.
11
+
12
+ // CHECK: "modules": [
13
+ // CHECK-NEXT: {
14
+ // CHECK: "command-line": [
15
+ // CHECK-NOT: "-arcmt-action=check"
16
+ // CHECK-NOT: "-objcmt-migrate-literals"
17
+ // CHECK-NOT: "-mt-migrate-directory"
18
+ // CHECK: ]
19
+ // CHECK: "name": "A"
20
+ // CHECK: }
21
+ // CHECK-NOT: "name": "A"
22
+ // CHECK: "translation-units"
23
+
24
+ // --- cdb1.json.template
25
+ [
26
+ {
27
+ " directory" : " DIR" ,
28
+ " command" : " clang -Imodules/A -fmodules -fmodules-cache-path=DIR/module-cache -fimplicit-modules -fimplicit-module-maps -ccc-arcmt-check -fsyntax-only DIR/t1.m" ,
29
+ " file" : " DIR/t1.m"
30
+ },
31
+ {
32
+ " directory" : " DIR" ,
33
+ " command" : " clang -Imodules/A -fmodules -fmodules-cache-path=DIR/module-cache -fimplicit-modules -fimplicit-module-maps -ccc-objcmt-migrate bob -fsyntax-only DIR/t2.m" ,
34
+ " file" : " DIR/t2.m"
35
+ }
36
+ ]
37
+
38
+ // --- modules/A/module.modulemap
39
+
40
+ module A {
41
+ umbrella header " A.h"
42
+ }
43
+
44
+ // --- modules/A/A.h
45
+
46
+ typedef int A_t;
47
+
48
+ // --- t1.m
49
+ @import A;
50
+
51
+ // --- t2.m
52
+ @import A;
You can’t perform that action at this time.
0 commit comments