[swift-dev] Question about demangling

Erik Eckstein eeckstein at apple.com
Wed Jul 26 12:42:42 CDT 2017

> On Jul 25, 2017, at 4:44 PM, Ethan Arbuckle via swift-dev <swift-dev at swift.org> wrote:
> 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 <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? 

I think the best way is to define and implement the flags for swift_demangle.

> _______________________________________________
> swift-dev mailing list
> swift-dev at swift.org <mailto:swift-dev at swift.org>
> https://lists.swift.org/mailman/listinfo/swift-dev <https://lists.swift.org/mailman/listinfo/swift-dev>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20170726/e76834f7/attachment.html>

More information about the swift-dev mailing list