forked from OSchip/llvm-project
[VPlan] Assert no users remaining when deleting a VPValue.
When deleting a VPValue, all users must already by deleted. Add an assertion to make sure and catch violations.
This commit is contained in:
parent
44c1a56869
commit
ca38652b9a
|
@ -84,6 +84,10 @@ public:
|
|||
VPValue(const VPValue &) = delete;
|
||||
VPValue &operator=(const VPValue &) = delete;
|
||||
|
||||
virtual ~VPValue() {
|
||||
assert(Users.empty() && "trying to delete a VPValue with remaining users");
|
||||
}
|
||||
|
||||
/// \return an ID for the concrete type of this object.
|
||||
/// This is used to implement the classof checks. This should not be used
|
||||
/// for any other purpose, as the values may change as LLVM evolves.
|
||||
|
|
Loading…
Reference in New Issue