diff options
author | Dale Johannesen <dalej@apple.com> | 2009-08-26 01:08:21 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2009-08-26 01:08:21 +0000 |
commit | 7fd6b0fff74a7c9fbc054b3303fee1a8f22002b2 (patch) | |
tree | 3abd3fea11f095755a9ddb18abea48e164d14985 /lib/AsmParser | |
parent | 2e1a5d0b91503b8d5ada9fe0b19567daca2f1c6f (diff) | |
download | external_llvm-7fd6b0fff74a7c9fbc054b3303fee1a8f22002b2.zip external_llvm-7fd6b0fff74a7c9fbc054b3303fee1a8f22002b2.tar.gz external_llvm-7fd6b0fff74a7c9fbc054b3303fee1a8f22002b2.tar.bz2 |
Add an 'inline hint' attribute to represent source
code hints that it would be a good idea to inline
a function ("inline" keyword). No functional change
yet; FEs do not emit this and inliner does not use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80063 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser')
-rw-r--r-- | lib/AsmParser/LLLexer.cpp | 1 | ||||
-rw-r--r-- | lib/AsmParser/LLParser.cpp | 1 | ||||
-rw-r--r-- | lib/AsmParser/LLToken.h | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/lib/AsmParser/LLLexer.cpp b/lib/AsmParser/LLLexer.cpp index 8d6b5db..23d7f19 100644 --- a/lib/AsmParser/LLLexer.cpp +++ b/lib/AsmParser/LLLexer.cpp @@ -556,6 +556,7 @@ lltok::Kind LLLexer::LexIdentifier() { KEYWORD(readnone); KEYWORD(readonly); + KEYWORD(inlinehint); KEYWORD(noinline); KEYWORD(alwaysinline); KEYWORD(optsize); diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index 5ac4a82..784672a 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -907,6 +907,7 @@ bool LLParser::ParseOptionalAttrs(unsigned &Attrs, unsigned AttrKind) { case lltok::kw_noinline: Attrs |= Attribute::NoInline; break; case lltok::kw_readnone: Attrs |= Attribute::ReadNone; break; case lltok::kw_readonly: Attrs |= Attribute::ReadOnly; break; + case lltok::kw_inlinehint: Attrs |= Attribute::InlineHint; break; case lltok::kw_alwaysinline: Attrs |= Attribute::AlwaysInline; break; case lltok::kw_optsize: Attrs |= Attribute::OptimizeForSize; break; case lltok::kw_ssp: Attrs |= Attribute::StackProtect; break; diff --git a/lib/AsmParser/LLToken.h b/lib/AsmParser/LLToken.h index a49d054..b053cca 100644 --- a/lib/AsmParser/LLToken.h +++ b/lib/AsmParser/LLToken.h @@ -82,6 +82,7 @@ namespace lltok { kw_readnone, kw_readonly, + kw_inlinehint, kw_noinline, kw_alwaysinline, kw_optsize, |