diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:30:08 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:30:08 +0000 |
commit | 44cf9c6d2d274eac37502e835155f7e985f1b8e6 (patch) | |
tree | 9576ba968924c5b9a55ba9e14f4f26184c62c7d4 /scripts/Dpkg/Shlibs/Cppfilt.pm | |
parent | Adding upstream version 1.22.6. (diff) | |
download | dpkg-44cf9c6d2d274eac37502e835155f7e985f1b8e6.tar.xz dpkg-44cf9c6d2d274eac37502e835155f7e985f1b8e6.zip |
Adding upstream version 1.22.7.upstream/1.22.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts/Dpkg/Shlibs/Cppfilt.pm')
-rw-r--r-- | scripts/Dpkg/Shlibs/Cppfilt.pm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/Dpkg/Shlibs/Cppfilt.pm b/scripts/Dpkg/Shlibs/Cppfilt.pm index 1f054a1..010fe66 100644 --- a/scripts/Dpkg/Shlibs/Cppfilt.pm +++ b/scripts/Dpkg/Shlibs/Cppfilt.pm @@ -96,8 +96,14 @@ sub cppfilt_demangle { my $demangled = readline($filt->{to}); chop $demangled; - # If the symbol was not demangled, return undef - $demangled = undef if $symbol eq $demangled; + # If the symbol was not demangled, return undef. Otherwise normalize + # it as llvm packs ending angle brackets with no intermediate spaces + # as allowed by C++11, contrary to GNU binutils. + if ($symbol eq $demangled) { + $demangled = undef; + } else { + $demangled =~ s{(?<=>)(?=>)}{ }g; + } # Remember the last result $filt->{last_symbol} = $symbol; |