[llvm] [LiveDebugVariables] Add basic verification (PR #79846)
Stephen Tozer via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 30 01:30:49 PST 2024
================
@@ -43,21 +43,34 @@ class raw_ostream;
/// SlotIndex & SlotIndexes classes for the public interface to this
/// information.
class IndexListEntry : public ilist_node<IndexListEntry> {
- MachineInstr *mi;
+#if NDEBUG
+ // Disable poison checks such that setPoison will do nothing and isPoisoned
+ // will return false.
+ static constexpr unsigned PoisonBits = 0;
+ static constexpr unsigned PoisonVal = 0;
+#else
+ static constexpr unsigned PoisonBits = 1;
+ static constexpr unsigned PoisonVal = 1;
+#endif
+
+ PointerIntPair<MachineInstr *, PoisonBits, unsigned> mi;
----------------
SLTozer wrote:
```suggestion
PointerIntPair<MachineInstr *, PoisonBits> mi;
```
Nit: The default type is `unsigned`, so we can skip explicitly passing it.
https://github.com/llvm/llvm-project/pull/79846
More information about the llvm-commits
mailing list