diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-21 06:27:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-21 06:27:31 +0000 |
commit | 81abbdd848aa02c30242bd22dcc6ffe024ae2957 (patch) | |
tree | 18544e32d73056286f831f252df7efb9868a6956 /lib/AST/DeclBase.cpp | |
parent | bc7a0299e4b9d6f669726976d00a08f47f03aa3f (diff) |
partially inline getAttrs() to speed up PR3810 (and lots of
other code presumably) by 4.3%
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67430 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r-- | lib/AST/DeclBase.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index 1e7ef549b4..812c362acd 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -171,10 +171,8 @@ void Decl::invalidateAttrs() { } } -const Attr *Decl::getAttrs() const { - if (!HasAttrs) - return 0; - +const Attr *Decl::getAttrsImpl() const { + assert(HasAttrs && "getAttrs() should verify this!"); return (*DeclAttrs)[this]; } |