summaryrefslogtreecommitdiff
path: root/include/clang/AST/DeclarationName.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-05-03 23:18:44 +0000
committerDouglas Gregor <dgregor@apple.com>2012-05-03 23:18:44 +0000
commit514d3b6b93c83c0841d2f9dd7af8ecc2877fe921 (patch)
tree1774faaa5731aaca69ef47b86d4a2b633f160796 /include/clang/AST/DeclarationName.h
parent301e2e40f9d56c2fa01d3021a4d8e2d343fafd35 (diff)
downloadclang-514d3b6b93c83c0841d2f9dd7af8ecc2877fe921.tar.gz
clang-514d3b6b93c83c0841d2f9dd7af8ecc2877fe921.tar.bz2
clang-514d3b6b93c83c0841d2f9dd7af8ecc2877fe921.tar.xz
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.h8
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.