mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
ClangImporter: refactor ClangImporterOptions to be ASTContext-owned. NFC
We need ClangImporterOptions to be persistent for several scenarios: (1) when creating a sub-ASTContext to build Swift modules from interfaces; and (2) when creating a new Clang instance to invoke Clang dependencies scanner. This change is NFC.
This commit is contained in:
@@ -2355,8 +2355,7 @@ static bool readBreakageAllowlist(SDKContext &Ctx, llvm::StringSet<> &lines) {
|
||||
invok.setModuleName("ForClangImporter");
|
||||
if (instance.setup(invok))
|
||||
return 1;
|
||||
ClangImporterOptions impOpts;
|
||||
auto importer = ClangImporter::create(instance.getASTContext(), impOpts);
|
||||
auto importer = ClangImporter::create(instance.getASTContext());
|
||||
SmallString<128> preprocessedFilePath;
|
||||
if (auto error = llvm::sys::fs::createTemporaryFile(
|
||||
"breakage-allowlist-", "txt", preprocessedFilePath)) {
|
||||
|
||||
Reference in New Issue
Block a user