[llvm-commits] [llvm] r147292 - /llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
Nick Lewycky
nicholas at mxc.ca
Tue Dec 27 10:27:22 PST 2011
Author: nicholas
Date: Tue Dec 27 12:27:22 2011
New Revision: 147292
URL: http://llvm.org/viewvc/llvm-project?rev=147292&view=rev
Log:
Use false not zero, as a bool.
Modified:
llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=147292&r1=147291&r2=147292&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Tue Dec 27 12:27:22 2011
@@ -1473,10 +1473,10 @@
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 &&
More information about the llvm-commits
mailing list