[clang] 3fe5a0c - MCDCCoverageBuilder: Use `pop_back_val()`
NAKAMURA Takumi via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 15 03:28:28 PST 2024
Author: NAKAMURA Takumi
Date: 2024-02-15T20:27:47+09:00
New Revision: 3fe5a0cfa5391db18fcc226f3f783642d3f44503
URL: https://github.com/llvm/llvm-project/commit/3fe5a0cfa5391db18fcc226f3f783642d3f44503
DIFF: https://github.com/llvm/llvm-project/commit/3fe5a0cfa5391db18fcc226f3f783642d3f44503.diff
LOG: MCDCCoverageBuilder: Use `pop_back_val()`
Added:
Modified:
clang/lib/CodeGen/CoverageMappingGen.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CoverageMappingGen.cpp b/clang/lib/CodeGen/CoverageMappingGen.cpp
index fdf821a0eb6928..eb3beec23808e6 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
More information about the cfe-commits
mailing list