summaryrefslogtreecommitdiffstats
path: root/scripts/Dpkg/Shlibs/Cppfilt.pm
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:30:08 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:30:08 +0000
commit44cf9c6d2d274eac37502e835155f7e985f1b8e6 (patch)
tree9576ba968924c5b9a55ba9e14f4f26184c62c7d4 /scripts/Dpkg/Shlibs/Cppfilt.pm
parentAdding upstream version 1.22.6. (diff)
downloaddpkg-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.pm10
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;