[swift-dev] Question about demangling

Ethan Arbuckle EA at DataTheorem.com
Tue Jul 25 18:35:31 CDT 2017


The Swift runtime exports a function to demangle Swift symbols, swift_demangle. See source: https://github.com/apple/swift/blob/32d15d8539c43ff26b599f7c4a08a79a10d4bf98/stdlib/public/runtime/Reflection.mm#L1200.
This function uses the default mangling options, as defined by `Demangle::DemangleOptions()`. I also see there is an argument called `flags`, which I believe eventually will allow demangling options to be changed. However, this is not yet implemented.
The format for the demangled symbols with I would like it, ideally, “Module.Class.Method”. The default options include a variety of other things, including argument count and types. What is my best approach for getting these desired demangling options?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20170725/c901f79b/attachment.html>


More information about the swift-dev mailing list