diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-01-22 21:15:51 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-01-22 21:15:51 +0000 |
commit | 09175b39f2e9c81fe07efc0187e8b5b372c9796e (patch) | |
tree | bc0c984f737e8525fd15114a7dfe8d06a5f47ba5 /llvm/lib/IR/Function.cpp | |
parent | 0017d8a4691e99ba1e15c351938f023ede03115e (diff) | |
download | llvm-09175b39f2e9c81fe07efc0187e8b5b372c9796e.zip llvm-09175b39f2e9c81fe07efc0187e8b5b372c9796e.tar.gz llvm-09175b39f2e9c81fe07efc0187e8b5b372c9796e.tar.bz2 |
More encapsulation work.
Use the AttributeSet when we're talking about more than one attribute. Add a
function that adds a single attribute. No functionality change intended.
llvm-svn: 173196
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r-- | llvm/lib/IR/Function.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp index cd35aff..6a5e616 100644 --- a/llvm/lib/IR/Function.cpp +++ b/llvm/lib/IR/Function.cpp @@ -250,7 +250,9 @@ void Function::dropAllReferences() { void Function::addAttribute(unsigned i, Attribute attr) { AttributeSet PAL = getAttributes(); - PAL = PAL.addAttr(getContext(), i, attr); + AttrBuilder B(attr); + PAL = PAL.addAttributes(getContext(), i, + AttributeSet::get(getContext(), i, B)); setAttributes(PAL); } |