aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Module.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
-rw-r--r--llvm/lib/IR/Module.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp
index eeb90a6..1946db2 100644
--- a/llvm/lib/IR/Module.cpp
+++ b/llvm/lib/IR/Module.cpp
@@ -149,10 +149,9 @@ FunctionCallee Module::getOrInsertFunction(StringRef Name, FunctionType *Ty,
if (!F) {
// Nope, add it
Function *New = Function::Create(Ty, GlobalVariable::ExternalLinkage,
- DL.getProgramAddressSpace(), Name);
+ DL.getProgramAddressSpace(), Name, this);
if (!New->isIntrinsic()) // Intrinsics get attrs set on construction
New->setAttributes(AttributeList);
- FunctionList.push_back(New);
return {Ty, New}; // Return the new prototype.
}