From a2db6f2bd8bed59cce5b4bec3a136816338915e0 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 28 May 2012 01:47:53 +0000 Subject: [PATCH] adjust to mainline llvm API change. llvm-svn: 157557 --- clang/lib/CodeGen/CGCall.cpp | 3 +-- clang/lib/CodeGen/CodeGenModule.cpp | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index cd01fa2..4a8efe1 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -2066,8 +2066,7 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, unsigned CallingConv; CodeGen::AttributeListType AttributeList; CGM.ConstructAttributeList(CallInfo, TargetDecl, AttributeList, CallingConv); - llvm::AttrListPtr Attrs = llvm::AttrListPtr::get(AttributeList.begin(), - AttributeList.end()); + llvm::AttrListPtr Attrs = llvm::AttrListPtr::get(AttributeList); llvm::BasicBlock *InvokeDest = 0; if (!(Attrs.getFnAttributes() & llvm::Attribute::NoUnwind)) diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 0da493f..d1f2fac 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -476,8 +476,7 @@ void CodeGenModule::SetLLVMFunctionAttributes(const Decl *D, unsigned CallingConv; AttributeListType AttributeList; ConstructAttributeList(Info, D, AttributeList, CallingConv); - F->setAttributes(llvm::AttrListPtr::get(AttributeList.begin(), - AttributeList.size())); + F->setAttributes(llvm::AttrListPtr::get(AttributeList)); F->setCallingConv(static_cast(CallingConv)); } @@ -1735,8 +1734,7 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old, ArgList.clear(); if (!NewCall->getType()->isVoidTy()) NewCall->takeName(CI); - NewCall->setAttributes(llvm::AttrListPtr::get(AttrVec.begin(), - AttrVec.end())); + NewCall->setAttributes(llvm::AttrListPtr::get(AttrVec)); NewCall->setCallingConv(CI->getCallingConv()); // Finally, remove the old call, replacing any uses with the new one. -- 2.7.4