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 | c0e2a1f4575520fcf1b202c838250d2623e23cd2 (patch) | |
tree | cd60385b64d0fc725f90fa818c7621543a8cee59 /llvm/lib/Transforms | |
parent | f71baa84eaca687c06dc44cc1a4349c8a344c48f (diff) | |
download | bcm5719-llvm-c0e2a1f4575520fcf1b202c838250d2623e23cd2.tar.gz bcm5719-llvm-c0e2a1f4575520fcf1b202c838250d2623e23cd2.zip |
Use the AttributeSet when adding multiple attributes and an Attribute::AttrKind
when adding a single attribute to the function.
llvm-svn: 173210
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/IPO/FunctionAttrs.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp index e9bc4ad4370..c267097c4a5 100644 --- a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp +++ b/llvm/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; |