Transforms: 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)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229202 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-02-14 01:11:29 +00:00
parent ef126cdf56
commit 7520a90c75
6 changed files with 19 additions and 39 deletions

View File

@ -2915,8 +2915,7 @@ static bool combineInstructionsOverFunction(
TargetLibraryInfo &TLI, DominatorTree &DT, const DataLayout *DL = nullptr,
LoopInfo *LI = nullptr) {
// Minimizing size?
bool MinimizeSize = F.getAttributes().hasAttribute(
AttributeSet::FunctionIndex, Attribute::MinSize);
bool MinimizeSize = F.hasFnAttribute(Attribute::MinSize);
/// Builder - This is an IRBuilder that automatically inserts new
/// instructions into the worklist when they are created.