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/BasicBlock.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/BasicBlock.cpp')
-rw-r--r-- | llvm/lib/IR/BasicBlock.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/llvm/lib/IR/BasicBlock.cpp b/llvm/lib/IR/BasicBlock.cpp index 5ed9bed..98a3062 100644 --- a/llvm/lib/IR/BasicBlock.cpp +++ b/llvm/lib/IR/BasicBlock.cpp @@ -19,7 +19,6 @@ #include "llvm/IR/Instructions.h" #include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/LLVMContext.h" -#include "llvm/IR/LeakDetector.h" #include "llvm/IR/Type.h" #include <algorithm> using namespace llvm; @@ -47,9 +46,6 @@ BasicBlock::BasicBlock(LLVMContext &C, const Twine &Name, Function *NewParent, BasicBlock *InsertBefore) : Value(Type::getLabelTy(C), Value::BasicBlockVal), Parent(nullptr) { - // Make sure that we get added to a function - LeakDetector::addGarbageObject(this); - if (NewParent) insertInto(NewParent, InsertBefore); else @@ -94,14 +90,8 @@ BasicBlock::~BasicBlock() { } void BasicBlock::setParent(Function *parent) { - if (getParent()) - LeakDetector::addGarbageObject(this); - // Set Parent=parent, updating instruction symtab entries as appropriate. InstList.setSymTabObject(&Parent, parent); - - if (getParent()) - LeakDetector::removeGarbageObject(this); } void BasicBlock::removeFromParent() { |