summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Function.cpp
diff options
context:
space:
mode:
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