Skip to content

Commit 3fe5a0c

Browse files
committed
MCDCCoverageBuilder: Use pop_back_val()
1 parent fd19137 commit 3fe5a0c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

clang/lib/CodeGen/CoverageMappingGen.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -770,12 +770,10 @@ struct MCDCCoverageBuilder {
770770
/// Pop and return the LHS Decision ([0,0] if not set).
771771
mcdc::ConditionIDs pop() {
772772
if (!CGM.getCodeGenOpts().MCDCCoverage || NotMapped)
773-
return DecisionStack.front();
773+
return DecisionStackSentinel;
774774

775775
assert(DecisionStack.size() > 1);
776-
mcdc::ConditionIDs D = DecisionStack.back();
777-
DecisionStack.pop_back();
778-
return D;
776+
return DecisionStack.pop_back_val();
779777
}
780778

781779
/// Return the total number of conditions and reset the state. The number of

0 commit comments

Comments
 (0)