mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge remote-tracking branch 'origin/main' into rebranch
This commit is contained in:
@@ -175,20 +175,20 @@ int modulewrap_main(ArrayRef<const char *> Args, const char *Argv0,
|
||||
SearchPathOpts.RuntimeResourcePath = std::string(RuntimeResourcePath.str());
|
||||
|
||||
SourceManager SrcMgr;
|
||||
SILOptions SILOpts;
|
||||
TypeCheckerOptions TypeCheckOpts;
|
||||
LangOptions LangOpts;
|
||||
ClangImporterOptions ClangImporterOpts;
|
||||
symbolgraphgen::SymbolGraphOptions SymbolGraphOpts;
|
||||
LangOpts.Target = Invocation.getTargetTriple();
|
||||
ASTContext &ASTCtx = *ASTContext::get(LangOpts, TypeCheckOpts, SearchPathOpts,
|
||||
ClangImporterOpts, SymbolGraphOpts, SrcMgr,
|
||||
Instance.getDiags());
|
||||
ASTContext &ASTCtx = *ASTContext::get(
|
||||
LangOpts, TypeCheckOpts, SILOpts, SearchPathOpts, ClangImporterOpts,
|
||||
SymbolGraphOpts, SrcMgr, Instance.getDiags());
|
||||
registerParseRequestFunctions(ASTCtx.evaluator);
|
||||
registerTypeCheckerRequestFunctions(ASTCtx.evaluator);
|
||||
|
||||
ASTCtx.addModuleLoader(ClangImporter::create(ASTCtx, ""), true);
|
||||
ModuleDecl *M = ModuleDecl::create(ASTCtx.getIdentifier("swiftmodule"), ASTCtx);
|
||||
SILOptions SILOpts;
|
||||
std::unique_ptr<Lowering::TypeConverter> TC(new Lowering::TypeConverter(*M));
|
||||
std::unique_ptr<SILModule> SM = SILModule::createEmptyModule(M, *TC, SILOpts);
|
||||
createSwiftModuleObjectFile(*SM, (*ErrOrBuf)->getBuffer(),
|
||||
|
||||
Reference in New Issue
Block a user