aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CoverageMappingGen.cpp
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2024-02-15 18:14:04 +0900
committerNAKAMURA Takumi <geek4civic@gmail.com>2024-02-15 20:27:47 +0900
commit3fe5a0cfa5391db18fcc226f3f783642d3f44503 (patch)
treed53f00319c77225ec7f5ad50055cb54c1d3132a5 /clang/lib/CodeGen/CoverageMappingGen.cpp
parentfd191378dce6b20c100da716f94130af2593df37 (diff)
downloadllvm-3fe5a0cfa5391db18fcc226f3f783642d3f44503.zip
llvm-3fe5a0cfa5391db18fcc226f3f783642d3f44503.tar.gz
llvm-3fe5a0cfa5391db18fcc226f3f783642d3f44503.tar.bz2
MCDCCoverageBuilder: Use `pop_back_val()`
Diffstat (limited to 'clang/lib/CodeGen/CoverageMappingGen.cpp')
-rw-r--r--clang/lib/CodeGen/CoverageMappingGen.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CoverageMappingGen.cpp b/clang/lib/CodeGen/CoverageMappingGen.cpp
index fdf821a..eb3beec 100644
--- a/clang/lib/CodeGen/CoverageMappingGen.cpp
+++ b/clang/lib/CodeGen/CoverageMappingGen.cpp
@@ -770,12 +770,10 @@ public:
/// 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