These should be equality comparisons. Fixes assertions while
self-hosting clang with codeview debug info.
Ultimately this is going to be covered by real tests for virtual method
emission, so I'm not adding a "don't crash on this input" test that I'll
remove soon afterwards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273446
91177308-0d34-0410-b5e6-
96231b3b80d8
StringRef getName() const { return Name; }
bool isIntroducingVirtual() const {
- const uint8_t K = static_cast<uint8_t>(Kind);
- const uint8_t V = static_cast<uint8_t>(MethodKind::IntroducingVirtual);
- const uint8_t PV = static_cast<uint8_t>(MethodKind::PureIntroducingVirtual);
- return (K & V) || (K & PV);
+ return Kind == MethodKind::IntroducingVirtual ||
+ Kind == MethodKind::PureIntroducingVirtual;
}
private: