diff options
author | Erik Pilkington <erik.pilkington@gmail.com> | 2019-01-17 21:37:36 +0000 |
---|---|---|
committer | Erik Pilkington <erik.pilkington@gmail.com> | 2019-01-17 21:37:36 +0000 |
commit | 394048ed3592c116efa443326891e4afe226b534 (patch) | |
tree | f60fe99b6028bdadf499fde1b468a51a3ae94861 /test | |
parent | 5057ba8643a728cc8516af75a409d885c5e99b7c (diff) | |
download | libcxxabi-394048ed3592c116efa443326891e4afe226b534.tar.gz |
[demangler] Ignore leading underscores if present
On MacOS, symbols start with a leading underscore, so just parse and
ignore it if present.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@351481 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/test_demangle.pass.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test_demangle.pass.cpp b/test/test_demangle.pass.cpp index 7c1fd2d..09ba043 100644 --- a/test/test_demangle.pass.cpp +++ b/test/test_demangle.pass.cpp @@ -29755,6 +29755,10 @@ const char* cases[][2] = {"_Z1fIJR1SS0_EEiDpOT_", "int f<S&, S>(S&, S&&)"}, {"___Z3foo_block_invoke.25", "invocation function for block in foo"}, + + // Darwin adds leading underscores to symbols, just demangle them anyways. + {"____Z3foo_block_invoke.25", "invocation function for block in foo"}, + {"__Z1fv", "f()"}, }; const unsigned N = sizeof(cases) / sizeof(cases[0]); |