mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Frontend] Set up output file .swiftmodule.summary
This patch focus on teaching frontend and driver to emit this file. The actual serialization and deserialization implementation will come later.
This commit is contained in:
@@ -274,6 +274,47 @@ bool FrontendOptions::canActionEmitCompiledSource(ActionType action) {
|
||||
return canActionEmitReferenceDependencies(action);
|
||||
}
|
||||
|
||||
bool FrontendOptions::canActionEmitModuleSummary(ActionType action) {
|
||||
switch (action) {
|
||||
case ActionType::NoneAction:
|
||||
case ActionType::Parse:
|
||||
case ActionType::ResolveImports:
|
||||
case ActionType::DumpParse:
|
||||
case ActionType::DumpInterfaceHash:
|
||||
case ActionType::DumpAST:
|
||||
case ActionType::EmitSyntax:
|
||||
case ActionType::PrintAST:
|
||||
case ActionType::EmitImportedModules:
|
||||
case ActionType::EmitPCH:
|
||||
case ActionType::DumpScopeMaps:
|
||||
case ActionType::DumpTypeRefinementContexts:
|
||||
case ActionType::DumpTypeInfo:
|
||||
case ActionType::EmitSILGen:
|
||||
case ActionType::EmitSIBGen:
|
||||
case ActionType::CompileModuleFromInterface:
|
||||
case ActionType::TypecheckModuleFromInterface:
|
||||
case ActionType::Immediate:
|
||||
case ActionType::REPL:
|
||||
case ActionType::EmitPCM:
|
||||
case ActionType::DumpPCM:
|
||||
case ActionType::ScanDependencies:
|
||||
case ActionType::ScanClangDependencies:
|
||||
case ActionType::Typecheck:
|
||||
case ActionType::MergeModules:
|
||||
case ActionType::EmitModuleOnly:
|
||||
case ActionType::PrintVersion:
|
||||
return false;
|
||||
case ActionType::EmitSIL:
|
||||
case ActionType::EmitSIB:
|
||||
case ActionType::EmitIR:
|
||||
case ActionType::EmitBC:
|
||||
case ActionType::EmitAssembly:
|
||||
case ActionType::EmitObject:
|
||||
return true;
|
||||
}
|
||||
llvm_unreachable("unhandled action");
|
||||
}
|
||||
|
||||
bool FrontendOptions::canActionEmitObjCHeader(ActionType action) {
|
||||
switch (action) {
|
||||
case ActionType::NoneAction:
|
||||
|
||||
Reference in New Issue
Block a user