diff options
| author | Thiago Macieira <thiago.macieira@intel.com> | 2023-09-12 16:15:14 -0700 |
|---|---|---|
| committer | Thiago Macieira <thiago.macieira@intel.com> | 2023-09-19 17:13:56 -0700 |
| commit | e456232ad3cef052980a07a0a9a9f5fa49b65ba3 (patch) | |
| tree | aa838713397ae44b30b368164a424a7ea2c66411 /tests/manual/graphicsframecapture/examplewindow.cpp | |
| parent | 4a6cbfbe5c90158ab2f4afed3d188dae3ec0ea85 (diff) | |
CMake/ELF: replace 'extern "C++"' with exhaustive mangled expansions
Commit 946f15efb76fffda37b77f7d194d679b904305b1 added the line
extern "C++" { std::* };
but that was too good to be true. The intention was to catch Standard
Library inline symbols that got emitted in our own libraries, not use of
Standard Library types in our symbols. Unfortunately, that glob
expression matches the demangling literally and return types for
templates are demangled in their usual position to the left of the
function name.
For example,
std::random_device qFoo(); // mangles as _Z4qFoov → "qFoo()"
but
template <typename T> T qFoo();
template std::random_device qFoo<std::random_device>();
mangles as _Z4qFooISt13random_deviceET_v and that demangles to
"std::random_device qFoo<std::random_device>()".
Therefore, we replace that with a full expansion according to the
mangling scheme. This includes a minor fix for the RTTI symbols, to
match nested names too (those with "N" in the name). It can't match
virtual override thunks ("Tv" and "Th"), because those have variable
length names and the matching is done by fnmatch(), not regex.
Pick-to: 6.6
Change-Id: I9d43e5b91eb142d6945cfffd178449cf68669cb6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'tests/manual/graphicsframecapture/examplewindow.cpp')
0 files changed, 0 insertions, 0 deletions
