summaryrefslogtreecommitdiff
path: root/lib/IR/Instruction.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-12-22 13:00:36 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-12-22 13:00:36 +0000
commitada5f24b5fd5fd1c9be505ffca21035b54b8d538 (patch)
tree56cdba3f425f930195e09410c4c7cf9149a6c7ff /lib/IR/Instruction.cpp
parent11dd9c3d557dd880dc1121781595bbf983df2a47 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224703 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/Instruction.cpp')
-rw-r--r--lib/IR/Instruction.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/IR/Instruction.cpp b/lib/IR/Instruction.cpp
index 3ee66f56981..92c6e9f3ded 100644
--- a/lib/IR/Instruction.cpp
+++ b/lib/IR/Instruction.cpp
@@ -15,7 +15,6 @@
#include "llvm/IR/CallSite.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Instructions.h"
-#include "llvm/IR/LeakDetector.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/Type.h"
@@ -24,8 +23,6 @@ using namespace llvm;
Instruction::Instruction(Type *ty, unsigned it, Use *Ops, unsigned NumOps,
Instruction *InsertBefore)
: User(ty, Value::InstructionVal + it, Ops, NumOps), Parent(nullptr) {
- // Make sure that we get added to a basicblock
- LeakDetector::addGarbageObject(this);
// If requested, insert this instruction into a basic block...
if (InsertBefore) {
@@ -42,8 +39,6 @@ const DataLayout *Instruction::getDataLayout() const {
Instruction::Instruction(Type *ty, unsigned it, Use *Ops, unsigned NumOps,
BasicBlock *InsertAtEnd)
: User(ty, Value::InstructionVal + it, Ops, NumOps), Parent(nullptr) {
- // Make sure that we get added to a basicblock
- LeakDetector::addGarbageObject(this);
// append this instruction into the basic block
assert(InsertAtEnd && "Basic block to append to may not be NULL!");
@@ -60,12 +55,6 @@ Instruction::~Instruction() {
void Instruction::setParent(BasicBlock *P) {
- if (getParent()) {
- if (!P) LeakDetector::addGarbageObject(this);
- } else {
- if (P) LeakDetector::removeGarbageObject(this);
- }
-
Parent = P;
}