diff options
author | Julian Lettner <julian.lettner@apple.com> | 2020-06-11 17:34:39 -0700 |
---|---|---|
committer | Julian Lettner <julian.lettner@apple.com> | 2020-07-06 12:12:22 -0700 |
commit | 71a6a41f1c55c43c07942e49ef8ecdabd95f8b61 (patch) | |
tree | c3c4569ba913867abcf4a77185b8c3012391f4b5 /llvm/lib/Object/WasmObjectFile.cpp | |
parent | dc6b3f03a872a1c551613e49db1d07bbdd8bfebb (diff) | |
download | llvm-71a6a41f1c55c43c07942e49ef8ecdabd95f8b61.zip llvm-71a6a41f1c55c43c07942e49ef8ecdabd95f8b61.tar.gz llvm-71a6a41f1c55c43c07942e49ef8ecdabd95f8b61.tar.bz2 |
[Sanitizer] Fix demangling for Swift symbol names
The Swift symbol name prefix has changed from `_T0` to `_$s` as
documented here [1]. This prevents Swift names from properly being
symbolicated when using the in-process LLVM symbolizer. The best way to
fix this seems to be to avoid the duplication of "Is this a Swift symbol
name?" here. We can simply remove this check as `swift_demangle`
already returns null for non-Swift names [2,3].
The check was included in the initial support for Swift name demangling
to avoid superfluous calls to `dlsym()` [4]. A subsequent commit
changed this logic to retrieve the `swift_demangle` function pointer
eagerly during sanitizer initialization, but did not remove the check
[5].
[1] https://github.com/apple/swift/blob/master/docs/ABI/Mangling.rst
[2] https://github.com/apple/swift/blob/b5a8b518eae54cea997f3b0954760fc7858829f6/include/swift/Demangling/Demangle.h#L643
[3] https://github.com/apple/swift/blob/b5a8b518eae54cea997f3b0954760fc7858829f6/stdlib/public/runtime/Demangle.cpp#L656
[4] https://reviews.llvm.org/D19135
[5] https://reviews.llvm.org/D20015
rdar://62753845
Reviewers: kubamracek, delcypher, dcoughlin, samsonov, thakis
Reviewed By: kubamracek
Differential Revision: https://reviews.llvm.org/D81705
Diffstat (limited to 'llvm/lib/Object/WasmObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions