#!/usr/bin/env bash
set -eu
function demangle {
echo " $1"
echo "libiberty: $(c++filt $1)"
echo "cpp_demangle: $(cargo run --bin cppfilt -- $1 2> /dev/null)"
}
# demangle '_Z3abcDTqult3def3ghi3jkl3mnoE'
demangle '_ZN7mozilla19WriteDumpFileHelperIfEENS_8EnableIfIXsr6IsSameIT_fEE5valueEvE4TypeEPS2_mP7__sFILE'