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
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp
index 228152e..6e1b476 100644
--- a/llvm/lib/IR/Function.cpp
+++ b/llvm/lib/IR/Function.cpp
@@ -39,12 +39,8 @@
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 @@
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.