[PATCH] D21109: IR: Call dropAllReferences from GlobalVariable's destructor.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 7 17:20:27 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL272077: IR: Call dropAllReferences from GlobalVariable's destructor. (authored by pcc).

Changed prior to commit:
  http://reviews.llvm.org/D21109?vs=59977&id=59978#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D21109

Files:
  llvm/trunk/include/llvm/IR/GlobalVariable.h

Index: llvm/trunk/include/llvm/IR/GlobalVariable.h
===================================================================
--- llvm/trunk/include/llvm/IR/GlobalVariable.h
+++ llvm/trunk/include/llvm/IR/GlobalVariable.h
@@ -65,6 +65,8 @@
                  bool isExternallyInitialized = false);
 
   ~GlobalVariable() override {
+    dropAllReferences();
+
     // FIXME: needed by operator delete
     setGlobalVariableNumOperands(1);
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21109.59978.patch
Type: text/x-patch
Size: 436 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160608/8dac38d4/attachment.bin>


More information about the llvm-commits mailing list