diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-11-20 05:09:43 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-11-20 05:09:43 +0000 |
commit | dd851595cb9123558c9029efdadb1b4be9881a3d (patch) | |
tree | 0f1a87938b4c99b68714f1cbd84c435adeeed96c /lib/CodeGen/CodeGenModule.cpp | |
parent | 0c5d005cd383e2d8c2bea388419ac26ace12e0f0 (diff) |
Update method calls to the new interface re r168354.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168355 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 8975e2f4c0..17972e29b6 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -533,7 +533,7 @@ void CodeGenModule::SetLLVMFunctionAttributes(const Decl *D, unsigned CallingConv; AttributeListType AttributeList; ConstructAttributeList(Info, D, AttributeList, CallingConv); - F->setAttributes(llvm::AttrListPtr::get(AttributeList)); + F->setAttributes(llvm::AttrListPtr::get(getLLVMContext(), AttributeList)); F->setCallingConv(static_cast<llvm::CallingConv::ID>(CallingConv)); } @@ -1864,7 +1864,7 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old, ArgList.clear(); if (!NewCall->getType()->isVoidTy()) NewCall->takeName(CI); - NewCall->setAttributes(llvm::AttrListPtr::get(AttrVec)); + NewCall->setAttributes(llvm::AttrListPtr::get(OldFn->getContext(), AttrVec)); NewCall->setCallingConv(CI->getCallingConv()); // Finally, remove the old call, replacing any uses with the new one. |