Skip to content

Commit 0759a5b

Browse files
committed
Address review comments
- Define a subclass of FrontendAction and call loadModule there. - Remove the API for creating a worker just for clang_experimental_DependencyScannerWorkerByModName_getFileDependencies_v1. - Add the capability to get the dependencies based on the module name to clang-scan-deps.
1 parent d14aa82 commit 0759a5b

File tree

15 files changed

+247
-64
lines changed

15 files changed

+247
-64
lines changed

clang/include/clang-c/Dependencies.h

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,6 @@ CINDEX_LINKAGE CXDependencyScannerWorker
169169
clang_experimental_DependencyScannerWorker_create_v0(
170170
CXDependencyScannerService);
171171

172-
/**
173-
* Same as \c clang_experimental_DependencyScannerWorker_create_v0 except that
174-
* module name is passed.
175-
*/
176-
CINDEX_LINKAGE CXDependencyScannerWorker
177-
clang_experimental_DependencyScannerWorkerByModName_create_v0(
178-
CXDependencyScannerService, const char *LookedUpModuleName);
179-
180172
CINDEX_LINKAGE void clang_experimental_DependencyScannerWorker_dispose_v0(
181173
CXDependencyScannerWorker);
182174

@@ -233,15 +225,13 @@ clang_experimental_DependencyScannerWorker_getFileDependencies_v1(
233225

234226
/**
235227
* Same as \c clang_experimental_DependencyScannerWorker_getFileDependencies_v1,
236-
* but \c Worker must have been created with
237-
* \c clang_experimental_DependencyScannerWorkerByModName_create_v0 and the
238-
* source file name shouldn't be passed in the argument list.
228+
* but get the dependencies by module name alone.
239229
*/
240230
CINDEX_LINKAGE CXFileDependencies *
241-
clang_experimental_DependencyScannerWorkerByModName_getFileDependencies_v1(
231+
clang_experimental_DependencyScannerWorkerByModName_getFileDependencies_v0(
242232
CXDependencyScannerWorker Worker, int argc, const char *const *argv,
243233
const char *WorkingDirectory, CXModuleDiscoveredCallback *MDC,
244-
void *Context, CXString *error);
234+
void *Context, CXString *error, const char *LookedUpModuleName);
245235

246236
/**
247237
* @}

clang/include/clang/Frontend/CompilerInstance.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -749,8 +749,6 @@ class CompilerInstance : public ModuleLoader {
749749
bool RemoveFileOnSignal, bool UseTemporary,
750750
bool CreateMissingDirectories);
751751

752-
const char *LookedUpModuleName = nullptr;
753-
754752
public:
755753
std::unique_ptr<raw_pwrite_stream> createNullOutputFile();
756754

@@ -787,8 +785,6 @@ class CompilerInstance : public ModuleLoader {
787785

788786
bool loadModuleFile(StringRef FileName);
789787

790-
void setLookedUpModuleName(const char *N) { LookedUpModuleName = N; }
791-
792788
private:
793789
/// Find a module, potentially compiling it, before reading its AST. This is
794790
/// the guts of loadModule.

clang/include/clang/Frontend/FrontendActions.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ class ReadPCHAndPreprocessAction : public FrontendAction {
4545
bool usesPreprocessorOnly() const override { return false; }
4646
};
4747

48+
class ReadPCHAndPreprocessByModNameAction : public ReadPCHAndPreprocessAction {
49+
const char *LookedUpModuleName;
50+
void ExecuteAction() override;
51+
52+
public:
53+
ReadPCHAndPreprocessByModNameAction(const char *ModName) : LookedUpModuleName(ModName) {}
54+
};
55+
4856
class DumpCompilerOptionsAction : public FrontendAction {
4957
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
5058
StringRef InFile) override {

clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ struct FullDependenciesResult {
7373
class DependencyScanningTool {
7474
public:
7575
/// Construct a dependency scanning tool.
76-
DependencyScanningTool(DependencyScanningService &Service);
76+
DependencyScanningTool(DependencyScanningService &Service,
77+
const char *LookedUpModuleName = nullptr);
7778

7879
/// Print out the dependency information into a string using the dependency
7980
/// file format that is specified in the options (-MD is the default) and
@@ -102,6 +103,7 @@ class DependencyScanningTool {
102103

103104
private:
104105
DependencyScanningWorker Worker;
106+
const char *LookedUpModuleName;
105107
};
106108

107109
} // end namespace dependencies

clang/include/clang/Tooling/DependencyScanning/DependencyScanningWorker.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ class DependencyConsumer {
5454
/// using the regular processing run.
5555
class DependencyScanningWorker {
5656
public:
57-
DependencyScanningWorker(DependencyScanningService &Service,
58-
const char *LookedUpModuleName = nullptr);
57+
DependencyScanningWorker(DependencyScanningService &Service);
5958

6059
/// Run the dependency scanning tool for a given clang driver invocation (as
6160
/// specified for the given Input in the CDB), and report the discovered
@@ -75,6 +74,8 @@ class DependencyScanningWorker {
7574

7675
ScanningOutputFormat getFormat() const { return Format; }
7776

77+
void setLookedUpModuleName(const char *Name) { LookedUpModuleName = Name; }
78+
7879
llvm::StringSet<> AlreadySeen;
7980

8081
private:

clang/lib/Frontend/CompilerInstance.cpp

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -994,19 +994,8 @@ bool CompilerInstance::ExecuteAction(FrontendAction &Act) {
994994
getSourceManager().clearIDTables();
995995

996996
if (Act.BeginSourceFile(*this, FIF)) {
997-
if (LookedUpModuleName) {
998-
FileID MainFileID = SourceMgr->getMainFileID();
999-
SourceLocation FileStart = SourceMgr->getLocForStartOfFile(MainFileID);
1000-
SmallVector<std::pair<IdentifierInfo *, SourceLocation>, 2> Path;
1001-
IdentifierInfo *ModuleID = PP->getIdentifierInfo(LookedUpModuleName);
1002-
Path.push_back(std::make_pair(ModuleID, FileStart));
1003-
auto ModResult = loadModule(FileStart, Path, Module::Hidden, false);
1004-
PPCallbacks *CB = PP->getPPCallbacks();
1005-
CB->moduleImport(SourceLocation(), Path, ModResult);
1006-
} else {
1007-
if (llvm::Error Err = Act.Execute()) {
1008-
consumeError(std::move(Err)); // FIXME this drops errors on the floor.
1009-
}
997+
if (llvm::Error Err = Act.Execute()) {
998+
consumeError(std::move(Err)); // FIXME this drops errors on the floor.
1010999
}
10111000
Act.EndSourceFile();
10121001
}

clang/lib/Frontend/FrontendActions.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,20 @@ void ReadPCHAndPreprocessAction::ExecuteAction() {
7777
} while (Tok.isNot(tok::eof));
7878
}
7979

80+
void ReadPCHAndPreprocessByModNameAction::ExecuteAction() {
81+
CompilerInstance &CI = getCompilerInstance();
82+
Preprocessor &PP = CI.getPreprocessor();
83+
SourceManager &SM = PP.getSourceManager();
84+
FileID MainFileID = SM.getMainFileID();
85+
SourceLocation FileStart = SM.getLocForStartOfFile(MainFileID);
86+
SmallVector<std::pair<IdentifierInfo *, SourceLocation>, 2> Path;
87+
IdentifierInfo *ModuleID = PP.getIdentifierInfo(LookedUpModuleName);
88+
Path.push_back(std::make_pair(ModuleID, FileStart));
89+
auto ModResult = CI.loadModule(FileStart, Path, Module::Hidden, false);
90+
PPCallbacks *CB = PP.getPPCallbacks();
91+
CB->moduleImport(SourceLocation(), Path, ModResult);
92+
}
93+
8094
std::unique_ptr<ASTConsumer>
8195
ReadPCHAndPreprocessAction::CreateASTConsumer(CompilerInstance &CI,
8296
StringRef InFile) {

clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ FullDependencies::getAdditionalArgsWithoutModulePaths() const {
4646
}
4747

4848
DependencyScanningTool::DependencyScanningTool(
49-
DependencyScanningService &Service)
50-
: Worker(Service) {}
49+
DependencyScanningService &Service, const char *LookedUpModuleName)
50+
: Worker(Service), LookedUpModuleName(LookedUpModuleName) {}
5151

5252
llvm::Expected<std::string> DependencyScanningTool::getDependencyFile(
5353
const tooling::CompilationDatabase &Compilations, StringRef CWD) {
@@ -196,6 +196,7 @@ DependencyScanningTool::getFullDependencies(
196196
std::string Input = Compilations.getAllCompileCommands().front().Filename;
197197

198198
FullDependencyPrinterConsumer Consumer(AlreadySeen);
199+
Worker.setLookedUpModuleName(LookedUpModuleName);
199200
llvm::Error Result =
200201
Worker.computeDependencies(Input, CWD, Compilations, Consumer);
201202
if (Result)

clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ class DependencyScanningAction : public tooling::ToolAction {
156156
// Create a compiler instance to handle the actual work.
157157
CompilerInstance Compiler(std::move(PCHContainerOps));
158158
Compiler.setInvocation(std::move(Invocation));
159-
Compiler.setLookedUpModuleName(LookedUpModuleName);
160159

161160
// Don't print 'X warnings and Y errors generated'.
162161
Compiler.getDiagnosticOpts().ShowCarets = false;
@@ -250,7 +249,11 @@ class DependencyScanningAction : public tooling::ToolAction {
250249
// the impact of strict context hashing.
251250
Compiler.getHeaderSearchOpts().ModulesStrictContextHash = true;
252251

253-
auto Action = std::make_unique<ReadPCHAndPreprocessAction>();
252+
std::unique_ptr<ReadPCHAndPreprocessAction> Action =
253+
LookedUpModuleName
254+
? std::make_unique<ReadPCHAndPreprocessByModNameAction>(
255+
LookedUpModuleName)
256+
: std::make_unique<ReadPCHAndPreprocessAction>();
254257
const bool Result = Compiler.ExecuteAction(*Action);
255258
if (!DepFS)
256259
FileMgr->clearStatCache();
@@ -269,8 +272,8 @@ class DependencyScanningAction : public tooling::ToolAction {
269272
} // end anonymous namespace
270273

271274
DependencyScanningWorker::DependencyScanningWorker(
272-
DependencyScanningService &Service, const char *LookedUpModuleName)
273-
: Format(Service.getFormat()), LookedUpModuleName(LookedUpModuleName) {
275+
DependencyScanningService &Service)
276+
: Format(Service.getFormat()) {
274277
DiagOpts = new DiagnosticOptions();
275278

276279
PCHContainerOps = std::make_shared<PCHContainerOperations>();
Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
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_cdb_input.cpp
5+
// RUN: cp %s %t.dir/modules_cdb_input2.cpp
6+
// RUN: mkdir %t.dir/Inputs
7+
// RUN: cp %S/Inputs/header.h %t.dir/Inputs/header.h
8+
// RUN: cp %S/Inputs/header2.h %t.dir/Inputs/header2.h
9+
// RUN: cp %S/Inputs/module.modulemap %t.dir/Inputs/module.modulemap
10+
// RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/modules_cdb.json > %t.cdb
11+
// RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/modules_cdb_clangcl.json > %t_clangcl.cdb
12+
//
13+
// RUN: echo %t.dir > %t.result
14+
// RUN: clang-scan-deps -compilation-database %t.cdb -j 4 -format experimental-full \
15+
// RUN: -mode preprocess-minimized-sources -module-name=header1 >> %t.result
16+
// RUN: cat %t.result | sed 's:\\\\\?:/:g' | FileCheck --check-prefixes=CHECK,CHECK-NO-ABS %s
17+
//
18+
// RUN: echo %t.dir > %t.result
19+
// RUN: clang-scan-deps -compilation-database %t.cdb -j 4 -format experimental-full \
20+
// RUN: -generate-modules-path-args -mode preprocess-minimized-sources -module-name=header1 >> %t.result
21+
// RUN: cat %t.result | sed 's:\\\\\?:/:g' | FileCheck --check-prefixes=CHECK,CHECK-ABS %s
22+
//
23+
// RUN: echo %t.dir > %t.result
24+
// RUN: clang-scan-deps -compilation-database %t.cdb -j 4 -format experimental-full \
25+
// RUN: -generate-modules-path-args -module-files-dir %t.dir/custom \
26+
// RUN: -mode preprocess-minimized-sources -module-name=header1 >> %t.result
27+
// RUN: cat %t.result | sed 's:\\\\\?:/:g' | FileCheck --check-prefixes=CHECK,CHECK-CUSTOM %s
28+
//
29+
// RUN: echo %t.dir > %t_clangcl.result
30+
// RUN: clang-scan-deps -compilation-database %t_clangcl.cdb -j 4 -format experimental-full \
31+
// RUN: -mode preprocess-minimized-sources -module-name=header1 >> %t_clangcl.result
32+
// RUN: cat %t_clangcl.result | sed 's:\\\\\?:/:g' | FileCheck --check-prefixes=CHECK,CHECK-NO-ABS %s
33+
34+
// CHECK: [[PREFIX:.*]]
35+
// CHECK-NEXT: {
36+
// CHECK-NEXT: "modules": [
37+
// CHECK-NEXT: {
38+
// CHECK-NEXT: "clang-module-deps": [
39+
// CHECK-NEXT: {
40+
// CHECK-NEXT: "context-hash": "[[HASH_H2_DINCLUDE:[A-Z0-9]+]]",
41+
// CHECK-NEXT: "module-name": "header2"
42+
// CHECK-NEXT: }
43+
// CHECK-NEXT: ],
44+
// CHECK-NEXT: "clang-modulemap-file": "[[PREFIX]]/Inputs/module.modulemap",
45+
// CHECK-NEXT: "command-line": [
46+
// CHECK-NEXT: "-cc1"
47+
// CHECK-NO-ABS-NOT: "-fmodule-map-file={{.*}}"
48+
// CHECK-ABS: "-fmodule-map-file=[[PREFIX]]/Inputs/module.modulemap"
49+
// CHECK-CUSTOM: "-fmodule-map-file=[[PREFIX]]/Inputs/module.modulemap"
50+
// CHECK: "-emit-module"
51+
// CHECK-NO-ABS-NOT: "-fmodule-file={{.*}}"
52+
// CHECK-ABS: "-fmodule-file=[[PREFIX]]/module-cache{{(_clangcl)?}}/[[HASH_H2_DINCLUDE]]/header2-{{[A-Z0-9]+}}.pcm"
53+
// CHECK-CUSTOM: "-fmodule-file=[[PREFIX]]/custom/[[HASH_H2_DINCLUDE]]/header2-{{[A-Z0-9]+}}.pcm"
54+
// CHECK: "-fmodule-name=header1"
55+
// CHECK: "-fno-implicit-modules"
56+
// CHECK: ],
57+
// CHECK-NEXT: "context-hash": "[[HASH_H1_DINCLUDE:[A-Z0-9]+]]",
58+
// CHECK-NEXT: "file-deps": [
59+
// CHECK-NEXT: "[[PREFIX]]/Inputs/header.h",
60+
// CHECK-NEXT: "[[PREFIX]]/Inputs/module.modulemap"
61+
// CHECK-NEXT: ],
62+
// CHECK-NEXT: "name": "header1"
63+
// CHECK-NEXT: },
64+
// CHECK-NEXT: {
65+
// CHECK-NEXT: "clang-module-deps": [],
66+
// CHECK-NEXT: "clang-modulemap-file": "[[PREFIX]]/Inputs/module.modulemap",
67+
// CHECK-NEXT: "command-line": [
68+
// CHECK-NEXT: "-cc1",
69+
// CHECK: "-emit-module",
70+
// CHECK: "-fmodule-name=header1",
71+
// CHECK: "-fno-implicit-modules",
72+
// CHECK: ],
73+
// CHECK-NEXT: "context-hash": "[[HASH_H1:[A-Z0-9]+]]",
74+
// CHECK-NEXT: "file-deps": [
75+
// CHECK-NEXT: "[[PREFIX]]/Inputs/header.h",
76+
// CHECK-NEXT: "[[PREFIX]]/Inputs/module.modulemap"
77+
// CHECK-NEXT: ],
78+
// CHECK-NEXT: "name": "header1"
79+
// CHECK-NEXT: },
80+
// CHECK-NEXT: {
81+
// CHECK-NEXT: "clang-module-deps": [],
82+
// CHECK-NEXT: "clang-modulemap-file": "[[PREFIX]]/Inputs/module.modulemap",
83+
// CHECK-NEXT: "command-line": [
84+
// CHECK-NEXT: "-cc1",
85+
// CHECK: "-emit-module",
86+
// CHECK: "-fmodule-name=header2",
87+
// CHECK: "-fno-implicit-modules",
88+
// CHECK: ],
89+
// CHECK-NEXT: "context-hash": "[[HASH_H2_DINCLUDE]]",
90+
// CHECK-NEXT: "file-deps": [
91+
// CHECK-NEXT: "[[PREFIX]]/Inputs/header2.h",
92+
// CHECK-NEXT: "[[PREFIX]]/Inputs/module.modulemap"
93+
// CHECK-NEXT: ],
94+
// CHECK-NEXT: "name": "header2"
95+
// CHECK-NEXT: }
96+
// CHECK-NEXT: ],
97+
// CHECK-NEXT: "translation-units": [
98+
// CHECK-NEXT: {
99+
// CHECK-NEXT: "clang-context-hash": "",
100+
// CHECK-NEXT: "clang-module-deps": [
101+
// CHECK-NEXT: {
102+
// CHECK-NEXT: "context-hash": "[[HASH_H1]]",
103+
// CHECK-NEXT: "module-name": "header1"
104+
// CHECK-NEXT: }
105+
// CHECK-NEXT: ],
106+
// CHECK-NEXT: "command-line": [
107+
// CHECK-NEXT: "-fno-implicit-modules"
108+
// CHECK-NEXT: "-fno-implicit-module-maps"
109+
// CHECK-NO-ABS-NOT: "-fmodule-file={{.*}}"
110+
// CHECK-ABS-NEXT: "-fmodule-file=[[PREFIX]]/module-cache{{(_clangcl)?}}/[[HASH_H1]]/header1-{{[A-Z0-9]+}}.pcm"
111+
// CHECK-CUSTOM-NEXT: "-fmodule-file=[[PREFIX]]/custom/[[HASH_H1]]/header1-{{[A-Z0-9]+}}.pcm"
112+
// CHECK-NO-ABS-NOT: "-fmodule-map-file={{.*}}"
113+
// CHECK-ABS-NEXT: "-fmodule-map-file=[[PREFIX]]/Inputs/module.modulemap"
114+
// CHECK-CUSTOM-NEXT: "-fmodule-map-file=[[PREFIX]]/Inputs/module.modulemap"
115+
// CHECK-NEXT: ],
116+
// CHECK-NEXT: "file-deps": []
117+
// CHECK-NEXT: "input-file": "[[PREFIX]]/modules_cdb_input.cpp"
118+
// CHECK-NEXT: },
119+
// CHECK-NEXT: {
120+
// CHECK-NEXT: "clang-context-hash": "",
121+
// CHECK-NEXT: "clang-module-deps": [
122+
// CHECK-NEXT: {
123+
// CHECK-NEXT: "context-hash": "[[HASH_H1]]",
124+
// CHECK-NEXT: "module-name": "header1"
125+
// CHECK-NEXT: }
126+
// CHECK-NEXT: ],
127+
// CHECK-NEXT: "command-line": [
128+
// CHECK-NEXT: "-fno-implicit-modules"
129+
// CHECK-NEXT: "-fno-implicit-module-maps"
130+
// CHECK-NO-ABS-NOT: "-fmodule-file={{.*}},
131+
// CHECK-ABS-NEXT: "-fmodule-file=[[PREFIX]]/module-cache{{(_clangcl)?}}/[[HASH_H1]]/header1-{{[A-Z0-9]+}}.pcm"
132+
// CHECK-CUSTOM-NEXT: "-fmodule-file=[[PREFIX]]/custom/[[HASH_H1]]/header1-{{[A-Z0-9]+}}.pcm"
133+
// CHECK-NO-ABS-NOT: "-fmodule-map-file={{.*}}
134+
// CHECK-ABS-NEXT: "-fmodule-map-file=[[PREFIX]]/Inputs/module.modulemap"
135+
// CHECK-CUSTOM-NEXT: "-fmodule-map-file=[[PREFIX]]/Inputs/module.modulemap"
136+
// CHECK-NEXT: ],
137+
// CHECK-NEXT: "file-deps": []
138+
// CHECK-NEXT: "input-file": "[[PREFIX]]/modules_cdb_input.cpp"
139+
// CHECK-NEXT: },
140+
// CHECK-NEXT: {
141+
// CHECK-NEXT: "clang-context-hash": "",
142+
// CHECK-NEXT: "clang-module-deps": [
143+
// CHECK-NEXT: {
144+
// CHECK-NEXT: "context-hash": "[[HASH_H1]]",
145+
// CHECK-NEXT: "module-name": "header1"
146+
// CHECK-NEXT: }
147+
// CHECK-NEXT: ],
148+
// CHECK-NEXT: "command-line": [
149+
// CHECK-NEXT: "-fno-implicit-modules"
150+
// CHECK-NEXT: "-fno-implicit-module-maps"
151+
// CHECK-NO-ABS-NOT: "-fmodule-file={{.*}}"
152+
// CHECK-ABS-NEXT: "-fmodule-file=[[PREFIX]]/module-cache{{(_clangcl)?}}/[[HASH_H1]]/header1-{{[A-Z0-9]+}}.pcm"
153+
// CHECK-CUSTOM-NEXT: "-fmodule-file=[[PREFIX]]/custom/[[HASH_H1]]/header1-{{[A-Z0-9]+}}.pcm"
154+
// CHECK-NO-ABS-NOT: "-fmodule-map-file={{.*}}"
155+
// CHECK-ABS-NEXT: "-fmodule-map-file=[[PREFIX]]/Inputs/module.modulemap"
156+
// CHECK-CUSTOM-NEXT: "-fmodule-map-file=[[PREFIX]]/Inputs/module.modulemap"
157+
// CHECK-NEXT: ],
158+
// CHECK-NEXT: "file-deps": []
159+
// CHECK-NEXT: "input-file": "[[PREFIX]]/modules_cdb_input.cpp"
160+
// CHECK-NEXT: },
161+
// CHECK-NEXT: {
162+
// CHECK-NEXT: "clang-context-hash": "",
163+
// CHECK-NEXT: "clang-module-deps": [
164+
// CHECK-NEXT: {
165+
// CHECK-NEXT: "context-hash": "[[HASH_H1_DINCLUDE]]",
166+
// CHECK-NEXT: "module-name": "header1"
167+
// CHECK-NEXT: }
168+
// CHECK-NEXT: ],
169+
// CHECK-NEXT: "command-line": [
170+
// CHECK-NEXT: "-fno-implicit-modules"
171+
// CHECK-NEXT: "-fno-implicit-module-maps"
172+
// CHECK-NO-ABS-NOT: "-fmodule-file={{.*}}"
173+
// CHECK-ABS-NEXT: "-fmodule-file=[[PREFIX]]/module-cache{{(_clangcl)?}}/[[HASH_H2_DINCLUDE]]/header2-{{[A-Z0-9]+}}.pcm"
174+
// CHECK-ABS-NEXT: "-fmodule-file=[[PREFIX]]/module-cache{{(_clangcl)?}}/[[HASH_H1_DINCLUDE]]/header1-{{[A-Z0-9]+}}.pcm"
175+
// CHECK-CUSTOM-NEXT: "-fmodule-file=[[PREFIX]]/custom/[[HASH_H2_DINCLUDE]]/header2-{{[A-Z0-9]+}}.pcm"
176+
// CHECK-CUSTOM-NEXT: "-fmodule-file=[[PREFIX]]/custom/[[HASH_H1_DINCLUDE]]/header1-{{[A-Z0-9]+}}.pcm"
177+
// CHECK-NO-ABS-NOT: "-fmodule-map-file={{.*}}"
178+
// CHECK-ABS-NEXT: "-fmodule-map-file=[[PREFIX]]/Inputs/module.modulemap"
179+
// CHECK-ABS-NEXT: "-fmodule-map-file=[[PREFIX]]/Inputs/module.modulemap"
180+
// CHECK-CUSTOM-NEXT: "-fmodule-map-file=[[PREFIX]]/Inputs/module.modulemap"
181+
// CHECK-CUSTOM-NEXT: "-fmodule-map-file=[[PREFIX]]/Inputs/module.modulemap"
182+
// CHECK-NEXT: ],
183+
// CHECK-NEXT: "file-deps": []
184+
// CHECK-NEXT: "input-file": "[[PREFIX]]/modules_cdb_input2.cpp"
185+
// CHECK-NEXT: }
186+
// CHECK-NEXT: ]
187+
// CHECK-NEXT: }

0 commit comments

Comments
 (0)