mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-05 13:09:10 +00:00
Add convenience method FoldingSetImpl::InsertNode(Node *N) that asserts if the node is already inserted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108192 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cfbf0ed8b0
commit
d6afb09a00
@ -166,6 +166,14 @@ public:
|
||||
/// FindNodeOrInsertPos.
|
||||
void InsertNode(Node *N, void *InsertPos);
|
||||
|
||||
/// InsertNode - Insert the specified node into the folding set, knowing that
|
||||
/// it is not already in the folding set.
|
||||
void InsertNode(Node *N) {
|
||||
Node *Inserted = GetOrInsertNode(N);
|
||||
(void)Inserted;
|
||||
assert(Inserted == N && "Node already inserted!");
|
||||
}
|
||||
|
||||
/// size - Returns the number of nodes in the folding set.
|
||||
unsigned size() const { return NumNodes; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user