diff --git a/clang/lib/CodeGen/CoverageMappingGen.cpp b/clang/lib/CodeGen/CoverageMappingGen.cpp index fdf821a0eb692..eb3beec23808e 100644 --- a/clang/lib/CodeGen/CoverageMappingGen.cpp +++ b/clang/lib/CodeGen/CoverageMappingGen.cpp @@ -770,12 +770,10 @@ struct MCDCCoverageBuilder { /// Pop and return the LHS Decision ([0,0] if not set). mcdc::ConditionIDs pop() { if (!CGM.getCodeGenOpts().MCDCCoverage || NotMapped) - return DecisionStack.front(); + return DecisionStackSentinel; assert(DecisionStack.size() > 1); - mcdc::ConditionIDs D = DecisionStack.back(); - DecisionStack.pop_back(); - return D; + return DecisionStack.pop_back_val(); } /// Return the total number of conditions and reset the state. The number of