diff options
| author | Pawel Wodnicki <pawel@32bitmicro.com> | 2012-11-22 06:10:56 +0000 |
|---|---|---|
| committer | Pawel Wodnicki <pawel@32bitmicro.com> | 2012-11-22 06:10:56 +0000 |
| commit | b5fa2f04f037a5d5caa858daf270f9b7406a7a36 (patch) | |
| tree | f094dad29211d2b9b0d167deaa5144c6f52c7e72 /lib/CodeGen/CodeGenModule.cpp | |
| parent | e469f9723e7d6b659dcafa88fe4acaeefd9f5f29 (diff) | |
| download | clang-b5fa2f04f037a5d5caa858daf270f9b7406a7a36.tar.gz clang-b5fa2f04f037a5d5caa858daf270f9b7406a7a36.tar.bz2 clang-b5fa2f04f037a5d5caa858daf270f9b7406a7a36.tar.xz | |
Merging r168355: into the 3.2 release branch.
Update method calls to the new interface re r168354.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_32@168487 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. |
