CPlusPlus: Inline some simple central functions

Depending on context, callgrind sees contributions of >8% to
the total cost of project parsing for these functions. The
functional are actualy executed executed out-of-line, often
for a function body of one "payload" instruction only.

Inlining removes the call/endbr64/ret overhead.

Change-Id: I6886f08e322fcaa4e0f54d424279e0a8c24e4718
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2022-06-23 16:56:36 +02:00
parent 85cd97a334
commit ffa3aad576
43 changed files with 532 additions and 1213 deletions

View File

@@ -178,7 +178,7 @@ bool isOwnershipRAIIType(Symbol *symbol, const LookupContext &context)
// This is not a "real" comparison of types. What we do is to resolve the symbol
// in question and then try to match its name with already known ones.
if (symbol->isDeclaration()) {
if (symbol->asDeclaration()) {
Declaration *declaration = symbol->asDeclaration();
const NamedType *namedType = declaration->type()->asNamedType();
if (namedType) {