From a92a4aad9a2c682467127d42cdc66e074831890b Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 18 Jan 2024 15:28:45 +0100 Subject: [PATCH] ProjectExplorer: Reduce GccToolchain interface a bit Change-Id: I6c867869d2157611bc8b08b1309d0bce43417f2f Reviewed-by: Jarek Kobus --- src/plugins/projectexplorer/gcctoolchain.cpp | 26 ++++++++++---------- src/plugins/projectexplorer/gcctoolchain.h | 15 ----------- 2 files changed, 13 insertions(+), 28 deletions(-) diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index e65f022bd5a..35c0428dbaa 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -206,9 +206,9 @@ static ProjectExplorer::Macros gccPredefinedMacros(const FilePath &gcc, return predefinedMacros; } -HeaderPaths GccToolchain::gccHeaderPaths(const FilePath &gcc, - const QStringList &arguments, - const Environment &env) +static HeaderPaths gccHeaderPaths(const FilePath &gcc, + const QStringList &arguments, + const Environment &env) { HeaderPaths builtInHeaderPaths; QByteArray line; @@ -729,16 +729,16 @@ void GccToolchain::initExtraHeaderPathsFunction(ExtraHeaderPathsFunction &&extra m_extraHeaderPathsFunction = std::move(extraHeaderPathsFunction); } -HeaderPaths GccToolchain::builtInHeaderPaths(const Environment &env, - const FilePath &compilerCommand, - const QStringList &platformCodeGenFlags, - OptionsReinterpreter reinterpretOptions, - HeaderPathsCache headerCache, - Id languageId, - ExtraHeaderPathsFunction extraHeaderPathsFunction, - const QStringList &flags, - const FilePath &sysRoot, - const QString &originalTargetTriple) +static HeaderPaths builtInHeaderPaths(const Environment &env, + const FilePath &compilerCommand, + const QStringList &platformCodeGenFlags, + std::function reinterpretOptions, + GccToolchain::HeaderPathsCache headerCache, + Id languageId, + std::function extraHeaderPathsFunction, + const QStringList &flags, + const FilePath &sysRoot, + const QString &originalTargetTriple) { QStringList arguments = gccPrepareArguments(flags, sysRoot, diff --git a/src/plugins/projectexplorer/gcctoolchain.h b/src/plugins/projectexplorer/gcctoolchain.h index a875b7cb4b6..7f870cc603f 100644 --- a/src/plugins/projectexplorer/gcctoolchain.h +++ b/src/plugins/projectexplorer/gcctoolchain.h @@ -110,21 +110,6 @@ protected: using ExtraHeaderPathsFunction = std::function; void initExtraHeaderPathsFunction(ExtraHeaderPathsFunction &&extraHeaderPathsFunction) const; - static HeaderPaths builtInHeaderPaths(const Utils::Environment &env, - const Utils::FilePath &compilerCommand, - const QStringList &platformCodeGenFlags, - OptionsReinterpreter reinterpretOptions, - HeaderPathsCache headerCache, - Utils::Id languageId, - ExtraHeaderPathsFunction extraHeaderPathsFunction, - const QStringList &flags, - const Utils::FilePath &sysRoot, - const QString &originalTargetTriple); - - static HeaderPaths gccHeaderPaths(const Utils::FilePath &gcc, - const QStringList &args, - const Utils::Environment &env); - int priority() const override { return m_priority; } QString sysRoot() const override;