|
@@ -274,11 +274,11 @@ phases::ID Driver::getFinalPhase(const DerivedArgList &DAL,
|
|
|
(PhaseArg = DAL.getLastArg(options::OPT__SLASH_P))) {
|
|
|
FinalPhase = phases::Preprocess;
|
|
|
|
|
|
- // --precompile only runs up to precompilation.
|
|
|
+ // --precompile only runs up to precompilation.
|
|
|
} else if ((PhaseArg = DAL.getLastArg(options::OPT__precompile))) {
|
|
|
FinalPhase = phases::Precompile;
|
|
|
|
|
|
- // -{fsyntax-only,-analyze,emit-ast} only run up to the compiler.
|
|
|
+ // -{fsyntax-only,-analyze,emit-ast} only run up to the compiler.
|
|
|
} else if ((PhaseArg = DAL.getLastArg(options::OPT_fsyntax_only)) ||
|
|
|
(PhaseArg = DAL.getLastArg(options::OPT_print_supported_cpus)) ||
|
|
|
(PhaseArg = DAL.getLastArg(options::OPT_module_file_info)) ||
|
|
@@ -286,23 +286,20 @@ phases::ID Driver::getFinalPhase(const DerivedArgList &DAL,
|
|
|
(PhaseArg = DAL.getLastArg(options::OPT_rewrite_objc)) ||
|
|
|
(PhaseArg = DAL.getLastArg(options::OPT_rewrite_legacy_objc)) ||
|
|
|
(PhaseArg = DAL.getLastArg(options::OPT__migrate)) ||
|
|
|
+ (PhaseArg = DAL.getLastArg(options::OPT_emit_iterface_stubs)) ||
|
|
|
(PhaseArg = DAL.getLastArg(options::OPT__analyze)) ||
|
|
|
(PhaseArg = DAL.getLastArg(options::OPT_emit_ast))) {
|
|
|
FinalPhase = phases::Compile;
|
|
|
|
|
|
- // clang interface stubs
|
|
|
- } else if ((PhaseArg = DAL.getLastArg(options::OPT_emit_iterface_stubs))) {
|
|
|
- FinalPhase = phases::IfsMerge;
|
|
|
-
|
|
|
- // -S only runs up to the backend.
|
|
|
+ // -S only runs up to the backend.
|
|
|
} else if ((PhaseArg = DAL.getLastArg(options::OPT_S))) {
|
|
|
FinalPhase = phases::Backend;
|
|
|
|
|
|
- // -c compilation only runs up to the assembler.
|
|
|
+ // -c compilation only runs up to the assembler.
|
|
|
} else if ((PhaseArg = DAL.getLastArg(options::OPT_c))) {
|
|
|
FinalPhase = phases::Assemble;
|
|
|
|
|
|
- // Otherwise do everything.
|
|
|
+ // Otherwise do everything.
|
|
|
} else
|
|
|
FinalPhase = phases::Link;
|
|
|
|
|
@@ -3326,7 +3323,6 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args,
|
|
|
// Construct the actions to perform.
|
|
|
HeaderModulePrecompileJobAction *HeaderModuleAction = nullptr;
|
|
|
ActionList LinkerInputs;
|
|
|
- ActionList MergerInputs;
|
|
|
|
|
|
for (auto &I : Inputs) {
|
|
|
types::ID InputType = I.first;
|
|
@@ -3364,17 +3360,6 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args,
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
- // TODO: Consider removing this because the merged may not end up being
|
|
|
- // the final Phase in the pipeline. Perhaps the merged could just merge
|
|
|
- // and then pass an artifact of some sort to the Link Phase.
|
|
|
- // Queue merger inputs.
|
|
|
- if (Phase == phases::IfsMerge) {
|
|
|
- assert(Phase == PL.back() && "merging must be final compilation step.");
|
|
|
- MergerInputs.push_back(Current);
|
|
|
- Current = nullptr;
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
// Each precompiled header file after a module file action is a module
|
|
|
// header of that same module file, rather than being compiled to a
|
|
|
// separate PCH.
|
|
@@ -3424,11 +3409,6 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args,
|
|
|
Actions.push_back(LA);
|
|
|
}
|
|
|
|
|
|
- // Add an interface stubs merge action if necessary.
|
|
|
- if (!MergerInputs.empty())
|
|
|
- Actions.push_back(
|
|
|
- C.MakeAction<IfsMergeJobAction>(MergerInputs, types::TY_Image));
|
|
|
-
|
|
|
// If --print-supported-cpus, -mcpu=? or -mtune=? is specified, build a custom
|
|
|
// Compile phase that prints out supported cpu models and quits.
|
|
|
if (Arg *A = Args.getLastArg(options::OPT_print_supported_cpus)) {
|
|
@@ -3465,8 +3445,6 @@ Action *Driver::ConstructPhaseAction(
|
|
|
switch (Phase) {
|
|
|
case phases::Link:
|
|
|
llvm_unreachable("link action invalid here.");
|
|
|
- case phases::IfsMerge:
|
|
|
- llvm_unreachable("ifsmerge action invalid here.");
|
|
|
case phases::Preprocess: {
|
|
|
types::ID OutputTy;
|
|
|
// -M and -MM specify the dependency file name by altering the output type,
|
|
@@ -3531,7 +3509,7 @@ Action *Driver::ConstructPhaseAction(
|
|
|
if (Args.hasArg(options::OPT_verify_pch))
|
|
|
return C.MakeAction<VerifyPCHJobAction>(Input, types::TY_Nothing);
|
|
|
if (Args.hasArg(options::OPT_emit_iterface_stubs))
|
|
|
- return C.MakeAction<CompileJobAction>(Input, types::TY_IFS_CPP);
|
|
|
+ return C.MakeAction<CompileJobAction>(Input, types::TY_IFS);
|
|
|
return C.MakeAction<CompileJobAction>(Input, types::TY_LLVM_BC);
|
|
|
}
|
|
|
case phases::Backend: {
|