diff options
Diffstat (limited to 'llvm/include/llvm/Use.h')
-rw-r--r-- | llvm/include/llvm/Use.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/include/llvm/Use.h b/llvm/include/llvm/Use.h index c5a3212ed83..c81a903e8b0 100644 --- a/llvm/include/llvm/Use.h +++ b/llvm/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. |