diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-12-22 13:00:36 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-12-22 13:00:36 +0000 |
commit | 366e5c1bf14934c846b643a0068f3d33b906ff1b (patch) | |
tree | 3a4a177b0f455e65b79974698a1f8abda7ec204a /llvm/lib/IR/Function.cpp | |
parent | c1a04162ba272cc8b9b887383e278b819c555cb6 (diff) | |
download | llvm-366e5c1bf14934c846b643a0068f3d33b906ff1b.zip llvm-366e5c1bf14934c846b643a0068f3d33b906ff1b.tar.gz llvm-366e5c1bf14934c846b643a0068f3d33b906ff1b.tar.bz2 |
The leak detector is dead, long live asan and valgrind.
In resent times asan and valgrind have found way more memory management bugs
in llvm than the special purpose leak detector.
llvm-svn: 224703
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r-- | llvm/lib/IR/Function.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp index ba6e4ce..f462ec0 100644 --- a/llvm/lib/IR/Function.cpp +++ b/llvm/lib/IR/Function.cpp @@ -23,7 +23,6 @@ #include "llvm/IR/InstIterator.h" #include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/LLVMContext.h" -#include "llvm/IR/LeakDetector.h" #include "llvm/IR/Module.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/RWMutex.h" @@ -46,20 +45,13 @@ Argument::Argument(Type *Ty, const Twine &Name, Function *Par) : Value(Ty, Value::ArgumentVal) { Parent = nullptr; - // Make sure that we get added to a function - LeakDetector::addGarbageObject(this); - if (Par) Par->getArgumentList().push_back(this); setName(Name); } void Argument::setParent(Function *parent) { - if (getParent()) - LeakDetector::addGarbageObject(this); Parent = parent; - if (getParent()) - LeakDetector::removeGarbageObject(this); } /// getArgNo - Return the index of this formal argument in its containing @@ -260,9 +252,6 @@ Function::Function(FunctionType *Ty, LinkageTypes Linkage, const Twine &name, if (Ty->getNumParams()) setValueSubclassData(1); // Set the "has lazy arguments" bit. - // Make sure that we get added to a function - LeakDetector::addGarbageObject(this); - if (ParentModule) ParentModule->getFunctionList().push_back(this); @@ -309,11 +298,7 @@ bool Function::arg_empty() const { } void Function::setParent(Module *parent) { - if (getParent()) - LeakDetector::addGarbageObject(this); Parent = parent; - if (getParent()) - LeakDetector::removeGarbageObject(this); } // dropAllReferences() - This function causes all the subinstructions to "let |