Skip to content

Commit 2836ee3

Browse files
committed
Frontend: pass down blocklist file paths from frontend options. NFC
1 parent 1b6d160 commit 2836ee3

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

include/swift/Basic/LangOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ namespace swift {
557557
ConcurrencyModel ActiveConcurrencyModel = ConcurrencyModel::Standard;
558558

559559
/// All block list configuration files to be honored in this compilation.
560-
std::vector<std::string> BlocklistConfigFilePath;
560+
std::vector<std::string> BlocklistConfigFilePaths;
561561

562562
bool isConcurrencyModelTaskToThread() const {
563563
return ActiveConcurrencyModel == ConcurrencyModel::TaskToThread;

include/swift/Frontend/FrontendOptions.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,8 @@ class FrontendOptions {
510510
/// textual imports
511511
bool EmitClangHeaderWithNonModularIncludes = false;
512512

513+
/// All block list configuration files to be honored in this compilation.
514+
std::vector<std::string> BlocklistConfigFilePaths;
513515
private:
514516
static bool canActionEmitDependencies(ActionType);
515517
static bool canActionEmitReferenceDependencies(ActionType);

lib/AST/ASTContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ ASTContext::ASTContext(
718718
if (!OutputBackend)
719719
OutputBackend = llvm::makeIntrusiveRefCnt<llvm::vfs::OnDiskOutputBackend>();
720720
// Insert all block list config paths.
721-
for (auto path: langOpts.BlocklistConfigFilePath) {
721+
for (auto path: langOpts.BlocklistConfigFilePaths) {
722722
blockListConfig.addConfigureFilePath(path);
723723
}
724724
}

lib/Frontend/ArgsToFrontendOptionsConverter.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,9 @@ bool ArgsToFrontendOptionsConverter::convert(
346346
}
347347
Opts.emptyABIDescriptor = Args.hasArg(OPT_empty_abi_descriptor);
348348
Opts.DeterministicCheck = Args.hasArg(OPT_enable_deterministic_check);
349+
for (auto A : Args.getAllArgValues(options::OPT_block_list_file)) {
350+
Opts.BlocklistConfigFilePaths.push_back(A);
351+
}
349352
return false;
350353
}
351354

lib/Frontend/CompilerInvocation.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,9 +1177,7 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
11771177

11781178
Opts.DumpTypeWitnessSystems = Args.hasArg(OPT_dump_type_witness_systems);
11791179

1180-
for (auto A : Args.getAllArgValues(options::OPT_block_list_file)) {
1181-
Opts.BlocklistConfigFilePath.push_back(A);
1182-
}
1180+
Opts.BlocklistConfigFilePaths = FrontendOpts.BlocklistConfigFilePaths;
11831181
if (const Arg *A = Args.getLastArg(options::OPT_concurrency_model)) {
11841182
Opts.ActiveConcurrencyModel =
11851183
llvm::StringSwitch<ConcurrencyModel>(A->getValue())

0 commit comments

Comments
 (0)