[PATCH] D51596: Fix bug in MachineInstr::hasPropertyInBundle
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 4 06:16:44 PDT 2018
bjope added inline comments.
================
Comment at: include/llvm/CodeGen/MachineInstr.h:587
bool hasProperty(unsigned MCFlag, QueryType Type = AnyInBundle) const {
+ assert(MCFlag < 64);
// Inline the fast path for unbundled or bundle-internal instructions.
----------------
Asserts should include an error message (see https://llvm.org/docs/CodingStandards.html#assert-liberally).
I think that something like this
`assert(MCFlag < 64 && "MCFlag out of range for bit mask in getFlags/hasPropertyInBundle.");`
also would explain why we require the value to be below 64.
Repository:
rL LLVM
https://reviews.llvm.org/D51596
More information about the llvm-commits
mailing list