No reason to create temporaries.
Differential Revision: https://reviews.llvm.org/D29871
Patch by sergio.martins!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295807
91177308-0d34-0410-b5e6-
96231b3b80d8
return true;
// Then check if any target dependent ones do.
- for (auto I : td_attrs())
+ for (const auto &I : td_attrs())
if (B.contains(I.first))
return true;
// attribute can not be inherited.
AttributeSet OldFnAttrs = oldFunction->getAttributes().getFnAttributes();
AttrBuilder AB(OldFnAttrs, AttributeSet::FunctionIndex);
- for (auto Attr : AB.td_attrs())
+ for (const auto &Attr : AB.td_attrs())
newFunction->addFnAttr(Attr.first, Attr.second);
newFunction->getBasicBlockList().push_back(newRootNode);