[PATCH] D129733: [SimplifyIndVar] Use enum class for ExtendKind. NFC
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 13 22:19:49 PDT 2022
craig.topper created this revision.
craig.topper added reviewers: nikic, reames, efriedma.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added a project: LLVM.
I happened to notice a two places where the enum was being pass
directly to the bool IsSigned argument of createExtendInst. This
was functionally ok since SignExtended in the enum has value
of 1, but the code shouldn't rely on that.
Using an enum class prevents the enum from being convertible to bool,
but does make writing the enum values more verbose. Since we now
have to write ExtendKind:: in front of them, I've shortened the
names of ZeroExtended and SignExtended.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D129733
Files:
llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129733.444518.patch
Type: text/x-patch
Size: 10497 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220714/942015a7/attachment.bin>
More information about the llvm-commits
mailing list