From 59dc98de2f79c027eb6860443daee260710b1405 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Fri, 14 Mar 2008 22:03:02 +0000 Subject: move the Use destructor where it belongs to git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48376 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Use.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/llvm/Use.h') diff --git a/include/llvm/Use.h b/include/llvm/Use.h index c5a3212ed8..c81a903e8b 100644 --- a/include/llvm/Use.h +++ b/include/llvm/Use.h @@ -37,7 +37,9 @@ public: Use(Value *V, User *U) { init(V, U); } Use(const Use &U) { init(U.Val, U.U); } - inline ~Use(); + inline ~Use() { + if (Val) removeFromList(); + } /// Default ctor - This leaves the Use completely unitialized. The only thing /// that is valid to do with this use is to call the "init" method. -- cgit v1.2.3