[PATCH] D110770: [clang] Remove duplication in types::getCompilationPhases()
Nico Weber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 30 08:19:05 PDT 2021
thakis added inline comments.
================
Comment at: clang/include/clang/Driver/Phases.h:25
IfsMerge,
- LastPhase = IfsMerge,
};
----------------
hans wrote:
> Any reason not to keep the LastPhase alias?
I found it more confusing than helpful. `Link` and `LastPhase` both start with `L` and it took me a while to realize that the last return in `getFinalPhase()` was `Link`, but the last one in was `getCompilationPhases()`. For the call on line 3847, passing phases::IfsMerge is clearer. And then there's only one use of it left (the default arg), and it doesn't add a ton of clarity there imho. But maybe I subconsciously feel vengeful because I lost 10 minutes due to misreading it for `Link` :) If you want me to put it back, let me know and I'll do so.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110770/new/
https://reviews.llvm.org/D110770
More information about the cfe-commits
mailing list