mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
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
This commit is contained in:
parent
a90b2c7240
commit
3258ed6a36
@ -47,6 +47,10 @@ namespace ISD {
|
|||||||
/// SelectionDAG.
|
/// SelectionDAG.
|
||||||
///
|
///
|
||||||
enum NodeType {
|
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 - This is the marker used to indicate the start of the region.
|
||||||
EntryToken,
|
EntryToken,
|
||||||
|
|
||||||
@ -712,6 +716,7 @@ class SDNode {
|
|||||||
public:
|
public:
|
||||||
virtual ~SDNode() {
|
virtual ~SDNode() {
|
||||||
assert(NumOperands == 0 && "Operand list not cleared before deletion");
|
assert(NumOperands == 0 && "Operand list not cleared before deletion");
|
||||||
|
NodeType = ISD::DELETED_NODE;
|
||||||
}
|
}
|
||||||
|
|
||||||
//===--------------------------------------------------------------------===//
|
//===--------------------------------------------------------------------===//
|
||||||
|
Loading…
Reference in New Issue
Block a user