summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Function.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-03-16 22:58:56 +0000
committerReid Kleckner <rnk@google.com>2017-03-16 22:58:56 +0000
commitc9a392b9dd7791420aa6475f8a2a81bf5731dfa6 (patch)
treec7010d058a82ebc1e0e23822ae3859b0415d3910 /llvm/lib/IR/Function.cpp
parent720883520d0dbe652baac17771c21764b8603879 (diff)
downloadbcm5719-llvm-c9a392b9dd7791420aa6475f8a2a81bf5731dfa6.tar.gz
bcm5719-llvm-c9a392b9dd7791420aa6475f8a2a81bf5731dfa6.zip
Remove dead F parameter from Argument constructor
When Function creates its argument list, it does the ilist push_back itself. No other caller passes in a parent function, so this is dead, and it uses the soon-to-be-deleted getArgumentList accessor. llvm-svn: 298009
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r--llvm/lib/IR/Function.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp
index 228152e99fb..6e1b4765270 100644
--- a/llvm/lib/IR/Function.cpp
+++ b/llvm/lib/IR/Function.cpp
@@ -39,12 +39,8 @@ template class llvm::SymbolTableListTraits<BasicBlock>;
void Argument::anchor() { }
-Argument::Argument(Type *Ty, const Twine &Name, Function *Par, unsigned ArgNo)
- : Value(Ty, Value::ArgumentVal), ArgNo(ArgNo) {
- Parent = nullptr;
-
- if (Par)
- Par->getArgumentList().push_back(this);
+Argument::Argument(Type *Ty, const Twine &Name, unsigned ArgNo)
+ : Value(Ty, Value::ArgumentVal), Parent(nullptr), ArgNo(ArgNo) {
setName(Name);
}
@@ -233,7 +229,7 @@ void Function::BuildLazyArguments() const {
assert(!FT->getParamType(i)->isVoidTy() &&
"Cannot have void typed arguments!");
ArgumentList.push_back(
- new Argument(FT->getParamType(i), "", nullptr, i));
+ new Argument(FT->getParamType(i), "", i));
}
// Clear the lazy arguments bit.
OpenPOWER on IntegriCloud