mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Semiwrap / meson / robotpy define `NDEBUG` when building their software in all modes, while `allwplib` only does it when building debug. This causes the size of `DenseMap` to differ between the shared libraries built here, and the extension modules built in `mostrobotpy`, causing segfaults when you try to execute code that uses `DenseMap`. This is not a problem with the robotpy code in `allwpilib`, because bazel uses the exact same compiler flags when building the shared libraries and pybind11 extensions.
23 lines
1010 B
Diff
23 lines
1010 B
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Leander Schulten <Leander.Schulten@rwth-aachen.de>
|
|
Date: Mon, 10 Jul 2023 00:53:43 +0200
|
|
Subject: [PATCH 26/35] Unused variable in release mode
|
|
|
|
---
|
|
llvm/include/llvm/ADT/DenseMap.h | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/llvm/include/llvm/ADT/DenseMap.h b/llvm/include/llvm/ADT/DenseMap.h
|
|
index 4c852d2b142b4a3de76a1ce4049822cc449287f7..69ce7982d732887642c7f46163b753ee17be9b30 100644
|
|
--- a/llvm/include/llvm/ADT/DenseMap.h
|
|
+++ b/llvm/include/llvm/ADT/DenseMap.h
|
|
@@ -126,7 +126,7 @@ public:
|
|
P->getFirst() = EmptyKey;
|
|
} else {
|
|
const KeyT TombstoneKey = getTombstoneKey();
|
|
- unsigned NumEntries = getNumEntries();
|
|
+ [[maybe_unused]] unsigned NumEntries = getNumEntries();
|
|
for (BucketT *P = getBuckets(), *E = getBucketsEnd(); P != E; ++P) {
|
|
if (!KeyInfoT::isEqual(P->getFirst(), EmptyKey)) {
|
|
if (!KeyInfoT::isEqual(P->getFirst(), TombstoneKey)) {
|