diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-05-03 23:18:44 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-05-03 23:18:44 +0000 |
commit | 514d3b6b93c83c0841d2f9dd7af8ecc2877fe921 (patch) | |
tree | 1774faaa5731aaca69ef47b86d4a2b633f160796 /include/clang/AST/DeclarationName.h | |
parent | 301e2e40f9d56c2fa01d3021a4d8e2d343fafd35 (diff) |
Split DeclarationName::getFETokenInfoAsVoid() into hot/cold paths and
(trivially) make DeclContext::lookup()'s const version inlinable. Good
for 0.3% on <rdar://problem/11004361>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156126 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/DeclarationName.h')
-rw-r--r-- | include/clang/AST/DeclarationName.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/clang/AST/DeclarationName.h b/include/clang/AST/DeclarationName.h index 6349d9c001..928a85c63b 100644 --- a/include/clang/AST/DeclarationName.h +++ b/include/clang/AST/DeclarationName.h @@ -155,7 +155,13 @@ private: /// getFETokenInfoAsVoid - Retrieves the front end-specified pointer /// for this name as a void pointer. - void *getFETokenInfoAsVoid() const; + void *getFETokenInfoAsVoid() const { + if (getNameKind() == Identifier) + return getAsIdentifierInfo()->getFETokenInfo<void>(); + return getFETokenInfoAsVoidSlow(); + } + + void *getFETokenInfoAsVoidSlow() const; public: /// DeclarationName - Used to create an empty selector. |