diff options
author | Gabor Greif <ggreif@gmail.com> | 2008-04-06 20:42:52 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2008-04-06 20:42:52 +0000 |
commit | d36afd7d65a53dba37285b8bc7288cb130ef1f25 (patch) | |
tree | dce9132b3bfc167b4fd32598f79aec90129ab18d /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | e9ecc68d8f7cce18cfce7e9806f924fc65aa4281 (diff) | |
download | bcm5719-llvm-d36afd7d65a53dba37285b8bc7288cb130ef1f25.tar.gz bcm5719-llvm-d36afd7d65a53dba37285b8bc7288cb130ef1f25.zip |
tracking API changes arising from r49277
llvm-svn: 49279
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 21b372b3477..83f661f012a 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/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()); } |