Skip to content

Commit deef5b8

Browse files
committed
[llvm][ir][NFC] Clean up "if after return" in ProfDataUtils.cpp
Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D131236
1 parent 3155e30 commit deef5b8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/lib/IR/ProfDataUtils.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,10 @@ bool extractProfTotalWeight(const MDNode *ProfileData, uint64_t &TotalVal) {
149149
TotalVal += V->getValue().getZExtValue();
150150
}
151151
return true;
152-
} else if (ProfDataName->getString().equals("VP") &&
153-
ProfileData->getNumOperands() > 3) {
152+
}
153+
154+
if (ProfDataName->getString().equals("VP") &&
155+
ProfileData->getNumOperands() > 3) {
154156
TotalVal = mdconst::dyn_extract<ConstantInt>(ProfileData->getOperand(2))
155157
->getValue()
156158
.getZExtValue();

0 commit comments

Comments
 (0)