diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-14 01:59:52 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-14 01:59:52 +0000 |
| commit | 5975a703e6657784339e25fcf84a745e9342668a (patch) | |
| tree | bae122334ffe750298e182588ed29005d4f4fdff /llvm/lib/Target/X86/X86CallFrameOptimization.cpp | |
| parent | 902a0238aa1514832a0d88661c9d7ccf112b71e0 (diff) | |
| download | bcm5719-llvm-5975a703e6657784339e25fcf84a745e9342668a.tar.gz bcm5719-llvm-5975a703e6657784339e25fcf84a745e9342668a.zip | |
X86: Canonicalize access to function attributes, NFC
Canonicalize access to function attributes to use the simpler API.
getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind)
=> getFnAttribute(Kind)
getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind)
=> hasFnAttribute(Kind)
llvm-svn: 229214
Diffstat (limited to 'llvm/lib/Target/X86/X86CallFrameOptimization.cpp')
| -rw-r--r-- | llvm/lib/Target/X86/X86CallFrameOptimization.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Target/X86/X86CallFrameOptimization.cpp b/llvm/lib/Target/X86/X86CallFrameOptimization.cpp index 1ede5c73f2b..d6563c2f271 100644 --- a/llvm/lib/Target/X86/X86CallFrameOptimization.cpp +++ b/llvm/lib/Target/X86/X86CallFrameOptimization.cpp @@ -163,11 +163,9 @@ bool X86CallFrameOptimization::isProfitable(MachineFunction &MF, return true; // Don't do this when not optimizing for size. - AttributeSet FnAttrs = MF.getFunction()->getAttributes(); bool OptForSize = - FnAttrs.hasAttribute(AttributeSet::FunctionIndex, - Attribute::OptimizeForSize) || - FnAttrs.hasAttribute(AttributeSet::FunctionIndex, Attribute::MinSize); + MF.getFunction()->hasFnAttribute(Attribute::OptimizeForSize) || + MF.getFunction()->hasFnAttribute(Attribute::MinSize); if (!OptForSize) return false; |

