diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-01-23 00:20:53 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-01-23 00:20:53 +0000 |
commit | 70d2ca0725b05a2d372e4dc3336e8ea350093e98 (patch) | |
tree | 2249ebb9f544a38c5ed721ded4957a66bb1b5917 /lib/Transforms | |
parent | bdd4e1311830bea92c8b8c09f0644cba15421241 (diff) | |
download | external_llvm-70d2ca0725b05a2d372e4dc3336e8ea350093e98.zip external_llvm-70d2ca0725b05a2d372e4dc3336e8ea350093e98.tar.gz external_llvm-70d2ca0725b05a2d372e4dc3336e8ea350093e98.tar.bz2 |
Use the AttributeSet when adding multiple attributes and an Attribute::AttrKind
when adding a single attribute to the function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173210 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/IPO/FunctionAttrs.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Transforms/IPO/FunctionAttrs.cpp b/lib/Transforms/IPO/FunctionAttrs.cpp index e9bc4ad..c267097 100644 --- a/lib/Transforms/IPO/FunctionAttrs.cpp +++ b/lib/Transforms/IPO/FunctionAttrs.cpp @@ -219,10 +219,8 @@ bool FunctionAttrs::AddReadAttrs(const CallGraphSCC &SCC) { Attribute::get(F->getContext(), B)); // Add in the new attribute. - B.clear(); - B.addAttribute(ReadsMemory ? Attribute::ReadOnly : Attribute::ReadNone); F->addAttribute(AttributeSet::FunctionIndex, - Attribute::get(F->getContext(), B)); + ReadsMemory ? Attribute::ReadOnly : Attribute::ReadNone); if (ReadsMemory) ++NumReadOnly; |