[attribute] rename @noinline to @inline(never).

Add support for parsing inline(never), it can be easily expanded to
handle inline(always).

rdar://17527111


Swift SVN r19447
This commit is contained in:
Manman Ren
2014-07-02 01:27:05 +00:00
parent 62a96d7ff4
commit 2b2330bf5b
18 changed files with 121 additions and 25 deletions

View File

@@ -230,7 +230,12 @@ bool SILDeclRef::isTransparent() const {
/// \brief True if the function has noinline attribute.
bool SILDeclRef::isNoinline() const {
return hasDecl() ? getDecl()->getAttrs().hasAttribute<NoinlineAttr>() : false;
if (!hasDecl())
return false;
if (auto InlineA = getDecl()->getAttrs().getAttribute<InlineAttr>())
if (InlineA->getKind() == InlineKind::Never)
return true;
return false;
}
bool SILDeclRef::isForeignThunk() const {