[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

Chris Lattner lattner at cs.uiuc.edu
Fri May 26 17:40:28 PDT 2006



Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.134 -> 1.135
---
Log message:

Add a new sentry node type, allowing assertions to catch trivial 
use-after-deleted errors.


---
Diffs of the changes:  (+5 -0)

 SelectionDAGNodes.h |    5 +++++
 1 files changed, 5 insertions(+)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.134 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.135
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.134	Fri May 26 18:09:09 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h	Fri May 26 19:40:15 2006
@@ -47,6 +47,10 @@
   /// SelectionDAG.
   ///
   enum NodeType {
+    // DELETED_NODE - This is an illegal flag value that is used to catch
+    // errors.  This opcode is not a legal opcode for any node.
+    DELETED_NODE,
+    
     // EntryToken - This is the marker used to indicate the start of the region.
     EntryToken,
 
@@ -712,6 +716,7 @@
 public:
   virtual ~SDNode() {
     assert(NumOperands == 0 && "Operand list not cleared before deletion");
+    NodeType = ISD::DELETED_NODE;
   }
   
   //===--------------------------------------------------------------------===//






More information about the llvm-commits mailing list