Skip to content

Commit 109586f

Browse files
committed
Frontend: pass down blocklist file paths from frontend options. NFC
1 parent 13efc5d commit 109586f

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
@@ -567,7 +567,7 @@ namespace swift {
567567
ConcurrencyModel ActiveConcurrencyModel = ConcurrencyModel::Standard;
568568

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

572572
bool isConcurrencyModelTaskToThread() const {
573573
return ActiveConcurrencyModel == ConcurrencyModel::TaskToThread;

include/swift/Frontend/FrontendOptions.h

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

515+
/// All block list configuration files to be honored in this compilation.
516+
std::vector<std::string> BlocklistConfigFilePaths;
515517
private:
516518
static bool canActionEmitDependencies(ActionType);
517519
static bool canActionEmitReferenceDependencies(ActionType);

lib/AST/ASTContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ ASTContext::ASTContext(
695695
registerAccessRequestFunctions(evaluator);
696696
registerNameLookupRequestFunctions(evaluator);
697697
// Insert all block list config paths.
698-
for (auto path: langOpts.BlocklistConfigFilePath) {
698+
for (auto path: langOpts.BlocklistConfigFilePaths) {
699699
blockListConfig.addConfigureFilePath(path);
700700
}
701701
}

lib/Frontend/ArgsToFrontendOptionsConverter.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,9 @@ bool ArgsToFrontendOptionsConverter::convert(
350350
Opts.serializedPathObfuscator.addMapping(SplitMap.first, SplitMap.second);
351351
}
352352
Opts.emptyABIDescriptor = Args.hasArg(OPT_empty_abi_descriptor);
353+
for (auto A : Args.getAllArgValues(options::OPT_block_list_file)) {
354+
Opts.BlocklistConfigFilePaths.push_back(A);
355+
}
353356
return false;
354357
}
355358

lib/Frontend/CompilerInvocation.cpp

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

12121212
Opts.DumpTypeWitnessSystems = Args.hasArg(OPT_dump_type_witness_systems);
12131213

1214-
for (auto A : Args.getAllArgValues(options::OPT_block_list_file)) {
1215-
Opts.BlocklistConfigFilePath.push_back(A);
1216-
}
1214+
Opts.BlocklistConfigFilePaths = FrontendOpts.BlocklistConfigFilePaths;
12171215
if (const Arg *A = Args.getLastArg(options::OPT_concurrency_model)) {
12181216
Opts.ActiveConcurrencyModel =
12191217
llvm::StringSwitch<ConcurrencyModel>(A->getValue())

0 commit comments

Comments
 (0)