1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

[codeview] Fix trivial bug in OneMethodRecord::isIntroducingVirtual

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.

llvm-svn: 273446
This commit is contained in:
Reid Kleckner 2016-06-22 17:32:59 +00:00
parent a37a807453
commit 6e294f46a8

View File

@ -904,10 +904,8 @@ public:
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: