diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-01-23 06:15:10 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-01-23 06:15:10 +0000 |
commit | 89530e45729d300b39c7332d2ad20c3ea476ab94 (patch) | |
tree | d4862a866d2f3932907e9c696ec02a5fd8fd2ef1 /lib/CodeGen/CodeGenModule.cpp | |
parent | 3edf387e4338ff98d9874b4c1b41d787e49d6c2b (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173229 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 0d4e0981d0..d5284f803c 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/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; |