aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2008-04-06 20:42:52 +0000
committerGabor Greif <ggreif@gmail.com>2008-04-06 20:42:52 +0000
commit984d0b414bc76d3530b9bc55a5a55834ba76c607 (patch)
treedb0ea355957060bfe91f915594da223f6a557784 /lib/CodeGen/CodeGenModule.cpp
parent3420766281f1d9626cfa710c000247f9625f26d4 (diff)
tracking API changes arising from r49277
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49279 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 21b372b347..83f661f012 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -149,7 +149,7 @@ llvm::Constant *CodeGenModule::GetAddrOfFunctionDecl(const FunctionDecl *D,
// If it doesn't already exist, just create and return an entry.
if (F == 0) {
// FIXME: param attributes for sext/zext etc.
- F = new llvm::Function(FTy, llvm::Function::ExternalLinkage, D->getName(),
+ F = llvm::Function::Create(FTy, llvm::Function::ExternalLinkage, D->getName(),
&getModule());
// Set the appropriate calling convention for the Function.
@@ -174,7 +174,7 @@ llvm::Constant *CodeGenModule::GetAddrOfFunctionDecl(const FunctionDecl *D,
// This happens if there is a prototype for a function (e.g. "int f()") and
// then a definition of a different type (e.g. "int f(int x)"). Start by
// making a new function of the correct type, RAUW, then steal the name.
- llvm::Function *NewFn = new llvm::Function(FTy,
+ llvm::Function *NewFn = llvm::Function::Create(FTy,
llvm::Function::ExternalLinkage,
"", &getModule());
NewFn->takeName(F);
@@ -399,7 +399,7 @@ llvm::Function *CodeGenModule::getBuiltinLibFunction(unsigned BuiltinID) {
}
// FIXME: param attributes for sext/zext etc.
- return FunctionSlot = new llvm::Function(Ty, llvm::Function::ExternalLinkage,
+ return FunctionSlot = llvm::Function::Create(Ty, llvm::Function::ExternalLinkage,
Name, &getModule());
}