forked from qt-creator/qt-creator
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:
@@ -1485,13 +1485,13 @@ QSet<QString> CppModelManager::symbolsInFiles(const QSet<Utils::FilePath> &files
|
||||
|
||||
const CPlusPlus::Identifier *symId = sym->identifier();
|
||||
// Add any class, function or namespace identifiers
|
||||
if ((sym->isClass() || sym->isFunction() || sym->isNamespace()) && symId
|
||||
if ((sym->asClass() || sym->asFunction() || sym->asNamespace()) && symId
|
||||
&& symId->chars()) {
|
||||
uniqueSymbols.insert(QString::fromUtf8(symId->chars()));
|
||||
}
|
||||
|
||||
// Handle specific case : get "Foo" in "void Foo::function() {}"
|
||||
if (sym->isFunction() && !sym->asFunction()->isDeclaration()) {
|
||||
if (sym->asFunction() && !sym->asFunction()->asDeclaration()) {
|
||||
const char *className = belongingClassName(sym->asFunction());
|
||||
if (className)
|
||||
uniqueSymbols.insert(QString::fromUtf8(className));
|
||||
|
Reference in New Issue
Block a user