mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-05 19:10:19 +00:00
Add a new sentry node type, allowing assertions to catch trivial
use-after-deleted errors. llvm-svn: 28513
This commit is contained in:
parent
1843c1ee17
commit
990b00b325
@ -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;
|
||||
}
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
|
Loading…
x
Reference in New Issue
Block a user