[clang] Remove duplication in types::getCompilationPhases()
authorNico Weber <thakis@chromium.org>
Wed, 29 Sep 2021 19:19:36 +0000 (15:19 -0400)
committerNico Weber <thakis@chromium.org>
Thu, 30 Sep 2021 18:17:14 +0000 (14:17 -0400)
commitfa32fd3bf7c070e62487e5ccba00557d57b2ee5c
tree46176bbbb527507fac409dafe83065efb8d47649
parent6714e1ce3b5ec02af2f9ab878bd10d273f02aa7e
[clang] Remove duplication in types::getCompilationPhases()

Call Driver::getFinalPhase() instead of duplicating it.

https://reviews.llvm.org/D65993 added the duplication, then
02e35832c301e maded it more obviously a copy of getFinalPhase().

The only difference is that getCompilationPhases() used to use
LastPhase / IfsMerge where getFinalPhase() used Link. Adapt
getFinalPhase() to return IfsMerge when needed.

No intentional behavior change.

Differential Revision: https://reviews.llvm.org/D110770
clang/include/clang/Driver/Driver.h
clang/include/clang/Driver/Phases.h
clang/include/clang/Driver/Types.h
clang/lib/Driver/Driver.cpp
clang/lib/Driver/Types.cpp