summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2016-10-25 02:54:08 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2016-10-25 02:54:08 +0000
commitca7664e761c68f9b77b39ad589bdc8c58ad61e0f (patch)
tree6edfa13036240b8b9a25626bdea104cbf2a5eb59 /llvm/lib
parent3364f907836d50482f77c7def3952b09e99caa97 (diff)
downloadbcm5719-llvm-ca7664e761c68f9b77b39ad589bdc8c58ad61e0f.tar.gz
bcm5719-llvm-ca7664e761c68f9b77b39ad589bdc8c58ad61e0f.zip
IR: Deduplicate getParent() functions on derived classes of GlobalValue into the base class. NFCI.
llvm-svn: 285050
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/Function.cpp4
-rw-r--r--llvm/lib/IR/Globals.cpp12
2 files changed, 0 insertions, 16 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp
index e1b4d4af457..d5ecd92524d 100644
--- a/llvm/lib/IR/Function.cpp
+++ b/llvm/lib/IR/Function.cpp
@@ -330,10 +330,6 @@ bool Function::arg_empty() const {
return getFunctionType()->getNumParams() == 0;
}
-void Function::setParent(Module *parent) {
- Parent = parent;
-}
-
// dropAllReferences() - This function causes all the subinstructions to "let
// go" of all references that they are maintaining. This allows one to
// 'delete' a whole class at a time, even though there may be circular
diff --git a/llvm/lib/IR/Globals.cpp b/llvm/lib/IR/Globals.cpp
index 1e4f0b4935f..58fc25a1d18 100644
--- a/llvm/lib/IR/Globals.cpp
+++ b/llvm/lib/IR/Globals.cpp
@@ -265,10 +265,6 @@ GlobalVariable::GlobalVariable(Module &M, Type *Ty, bool constant,
M.getGlobalList().push_back(this);
}
-void GlobalVariable::setParent(Module *parent) {
- Parent = parent;
-}
-
void GlobalVariable::removeFromParent() {
getParent()->getGlobalList().remove(getIterator());
}
@@ -367,10 +363,6 @@ GlobalAlias *GlobalAlias::create(const Twine &Name, GlobalValue *Aliasee) {
return create(Aliasee->getLinkage(), Name, Aliasee);
}
-void GlobalAlias::setParent(Module *parent) {
- Parent = parent;
-}
-
void GlobalAlias::removeFromParent() {
getParent()->getAliasList().remove(getIterator());
}
@@ -404,10 +396,6 @@ GlobalIFunc *GlobalIFunc::create(Type *Ty, unsigned AddressSpace,
return new GlobalIFunc(Ty, AddressSpace, Link, Name, Resolver, ParentModule);
}
-void GlobalIFunc::setParent(Module *parent) {
- Parent = parent;
-}
-
void GlobalIFunc::removeFromParent() {
getParent()->getIFuncList().remove(getIterator());
}
OpenPOWER on IntegriCloud