Fix evaluation order. Spotted by Alexander Riccio!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262907 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Peter Collingbourne 2016-03-08 03:50:36 +00:00
parent 7cca145db8
commit fb8bf30df5

View File

@ -459,7 +459,7 @@ bool DevirtModule::tryUniqueRetValOpt(
auto tryUniqueRetValOptFor = [&](bool IsOne) {
const BitSetInfo *UniqueBitSet = 0;
for (const VirtualCallTarget &Target : TargetsForSlot) {
if (Target.RetVal == IsOne ? 1 : 0) {
if (Target.RetVal == (IsOne ? 1 : 0)) {
if (UniqueBitSet)
return false;
UniqueBitSet = Target.BS;