[llvm] Implement MCDCTVIdxBuilder (LLVM side) (PR #80676)

Jessica Paquette via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 11 17:44:14 PST 2024


================
@@ -223,9 +223,127 @@ Expected<int64_t> CounterMappingContext::evaluate(const Counter &C) const {
   return LastPoppedValue;
 }
 
+MCDCTVIdxBuilder::MCDCTVIdxBuilder(
+    std::function<NodeIDs(bool TellSize)> Fetcher) {
+  // Build Nodes and set up each InCount
+  int MaxID = -1;
+  Nodes.resize(std::get<0>(Fetcher(true)));
+  while (true) {
----------------
ornata wrote:

I think it's fine for structured bindings to live inside loop headers.

```
int ID = 0;
for (auto [ID1, FalseID1, TrueID1] = Fetcher(false); ID1; ID = ID1 - 1;)
```



https://github.com/llvm/llvm-project/pull/80676


More information about the llvm-commits mailing list