From ce2f9c5c63b97907d148863cd4cb88324e91ec17 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 23 Jan 2013 06:15:10 +0000 Subject: Remove the last of uses that use the Attribute object as a collection of attributes. Collections of attributes are handled via the AttributeSet class now. This finally frees us up to make significant changes to how attributes are structured. llvm-svn: 173229 --- clang/lib/CodeGen/CodeGenModule.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 0d4e098..d5284f8 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1965,9 +1965,12 @@ static void replaceUsesOfNonProtoConstant(llvm::Constant *old, } // Add any parameter attributes. - llvm::Attribute pAttrs = oldAttrs.getParamAttributes(argNo + 1); - if (pAttrs.hasAttributes()) - newAttrs.push_back(llvm::AttributeWithIndex::get(argNo + 1, pAttrs)); + if (oldAttrs.hasAttributes(argNo + 1)) + newAttrs. + push_back(llvm::AttributeWithIndex:: + get(newFn->getContext(), + argNo + 1, + oldAttrs.getParamAttributes(argNo + 1))); } if (dontTransform) continue; -- cgit v1.1