diff options
author | Nico Weber <nicolasweber@gmx.de> | 2019-10-03 02:38:43 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2019-10-03 02:38:43 +0000 |
commit | 6713f8235bac3a5883af6eee841cb50a8832d754 (patch) | |
tree | 3a3a1b5ff96132cb61a7a412a1668fdac6f62a22 /clang/lib/Driver/Driver.cpp | |
parent | 45f682f47129c05414d4c5ae7be851772273978f (diff) | |
download | bcm5719-llvm-6713f8235bac3a5883af6eee841cb50a8832d754.tar.gz bcm5719-llvm-6713f8235bac3a5883af6eee841cb50a8832d754.zip |
Revert 373538 and follow-ups 373549 and 373552.
They break tests on (at least) macOS.
llvm-svn: 373556
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
-rw-r--r-- | clang/lib/Driver/Driver.cpp | 36 |
1 files changed, 7 insertions, 29 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index de7ca40d0cd..5233691be60 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -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: { |