[Lldb-commits] [lldb] Fix #168467 (r598213) (PR #169232)
Aiden Grossman via lldb-commits
lldb-commits at lists.llvm.org
Sun Nov 23 12:17:49 PST 2025
================
@@ -68,11 +68,13 @@ class MockMemory {
MockMemory() = default;
MockMemory(Map memory) : m_memory(std::move(memory)) {
// Make sure the requested memory size matches the returned value.
+#ifndef NDEBUG
for (auto &kv : m_memory) {
auto &req = kv.first;
auto &bytes = kv.second;
assert(bytes.size() == req.size);
}
+#endif
----------------
boomanaiden154 wrote:
```suggestion
for ([[maybe_unused]] auto [&req, &byes] : m_memory) {
assert(bytes.size() == req.size);
}
```
I think should work and is a bit cleaner than using the preprocessor.
https://github.com/llvm/llvm-project/pull/169232
More information about the lldb-commits
mailing list