Add a new sentry node type, allowing assertions to catch trivial
authorChris Lattner <sabre@nondot.org>
Sat, 27 May 2006 00:40:15 +0000 (00:40 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 27 May 2006 00:40:15 +0000 (00:40 +0000)
use-after-deleted errors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28513 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/SelectionDAGNodes.h

index 0dcd8017995567d3afc7312ec79cb92961ff30a1..c5b9756de393a5e5f17396a3634e6047216b8de6 100644 (file)
@@ -47,6 +47,10 @@ namespace ISD {
   /// 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 @@ class SDNode {
 public:
   virtual ~SDNode() {
     assert(NumOperands == 0 && "Operand list not cleared before deletion");
+    NodeType = ISD::DELETED_NODE;
   }
   
   //===--------------------------------------------------------------------===//