diff options
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; |