QObject: mark two error reporting functions COLD
They already nicely factored this error-only code from the normal path of execution. All that was missing was for them to be marked as COLD, so the compiler moves them out of the way even further, and optimizes them for size, not speed. TEXT size savings: ~400b on GCC 11.2 and ~500b on Clang 10 optimized C++20 AMD64 Linux builds. Pick-to: 6.3 6.2 5.15 Change-Id: I64a4123645855b4e34fbb0bc3304d144d7191a0d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
c5183b497e
commit
949b85a721
@ -2691,6 +2691,7 @@ static bool check_method_code(int code, const QObject *object, const char *metho
|
||||
return true;
|
||||
}
|
||||
|
||||
Q_DECL_COLD_FUNCTION
|
||||
static void err_method_notfound(const QObject *object,
|
||||
const char *method, const char *func)
|
||||
{
|
||||
@ -2708,6 +2709,7 @@ static void err_method_notfound(const QObject *object,
|
||||
object->metaObject()->className(), method + 1, loc ? " in " : "", loc ? loc : "");
|
||||
}
|
||||
|
||||
Q_DECL_COLD_FUNCTION
|
||||
static void err_info_about_objects(const char *func, const QObject *sender, const QObject *receiver)
|
||||
{
|
||||
QString a = sender ? sender->objectName() : QString();
|
||||
|
Loading…
x
Reference in New Issue
Block a user