diff options
author | Chris Lattner <sabre@nondot.org> | 2006-05-27 00:40:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-05-27 00:40:15 +0000 |
commit | 3258ed6a361bf405a89f7af0b1885841d9909516 (patch) | |
tree | 3e75d5d15d673bebd9b0194bf0aea21cfacacbda | |
parent | a90b2c7240ef4b2db134cc3ae55210652508f073 (diff) |
Add a new sentry node type, allowing assertions to catch trivial
use-after-deleted errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28513 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 0dcd801799..c5b9756de3 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -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; } //===--------------------------------------------------------------------===// |