1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

Use false not zero, as a bool.

llvm-svn: 147292
This commit is contained in:
Nick Lewycky 2011-12-27 18:27:22 +00:00
parent f4c21901a3
commit 4c5662bae0

View File

@ -1473,10 +1473,10 @@ static bool ExtractBranchMetadata(BranchInst *BI,
assert(BI->isConditional() &&
"Looking for probabilities on unconditional branch?");
MDNode *ProfileData = BI->getMetadata(LLVMContext::MD_prof);
if (!ProfileData || ProfileData->getNumOperands() != 3) return 0;
if (!ProfileData || ProfileData->getNumOperands() != 3) return false;
ConstantInt *CITrue = dyn_cast<ConstantInt>(ProfileData->getOperand(1));
ConstantInt *CIFalse = dyn_cast<ConstantInt>(ProfileData->getOperand(2));
if (!CITrue || !CIFalse) return 0;
if (!CITrue || !CIFalse) return false;
ProbTrue = CITrue->getValue();
ProbFalse = CIFalse->getValue();
assert(ProbTrue.getBitWidth() == 32 && ProbFalse.getBitWidth() == 32 &&