aboutsummaryrefslogtreecommitdiffstats
path: root/lib/IR/Globals.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/IR/Globals.cpp')
-rw-r--r--lib/IR/Globals.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/IR/Globals.cpp b/lib/IR/Globals.cpp
index e181d62..54197d9 100644
--- a/lib/IR/Globals.cpp
+++ b/lib/IR/Globals.cpp
@@ -18,7 +18,6 @@
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/GlobalAlias.h"
#include "llvm/IR/GlobalVariable.h"
-#include "llvm/IR/LeakDetector.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Operator.h"
#include "llvm/Support/ErrorHandling.h"
@@ -159,8 +158,6 @@ GlobalVariable::GlobalVariable(Type *Ty, bool constant, LinkageTypes Link,
"Initializer should be the same type as the GlobalVariable!");
Op<0>() = InitVal;
}
-
- LeakDetector::addGarbageObject(this);
}
GlobalVariable::GlobalVariable(Module &M, Type *Ty, bool constant,
@@ -180,8 +177,6 @@ GlobalVariable::GlobalVariable(Module &M, Type *Ty, bool constant,
Op<0>() = InitVal;
}
- LeakDetector::addGarbageObject(this);
-
if (Before)
Before->getParent()->getGlobalList().insert(Before, this);
else
@@ -189,11 +184,7 @@ GlobalVariable::GlobalVariable(Module &M, Type *Ty, bool constant,
}
void GlobalVariable::setParent(Module *parent) {
- if (getParent())
- LeakDetector::addGarbageObject(this);
Parent = parent;
- if (getParent())
- LeakDetector::removeGarbageObject(this);
}
void GlobalVariable::removeFromParent() {
@@ -259,7 +250,6 @@ GlobalAlias::GlobalAlias(Type *Ty, unsigned AddressSpace, LinkageTypes Link,
Module *ParentModule)
: GlobalValue(PointerType::get(Ty, AddressSpace), Value::GlobalAliasVal,
&Op<0>(), 1, Link, Name) {
- LeakDetector::addGarbageObject(this);
Op<0>() = Aliasee;
if (ParentModule)
@@ -296,11 +286,7 @@ GlobalAlias *GlobalAlias::create(const Twine &Name, GlobalValue *Aliasee) {
}
void GlobalAlias::setParent(Module *parent) {
- if (getParent())
- LeakDetector::addGarbageObject(this);
Parent = parent;
- if (getParent())
- LeakDetector::removeGarbageObject(this);
}
void GlobalAlias::removeFromParent() {