[cfe-dev] Accessibility of name mangling utilities

Douglas Gregor dgregor at apple.com
Wed May 12 08:39:08 PDT 2010


On May 12, 2010, at 5:29 AM, Anton Lokhmotov wrote:

>> In our application we would like to reuse part of the name mangling
>> utilities provided by clang.
> 
> Yes, that would be good but I guess would require more re-engineering than
> simply moving the corresponding header files.  When I needed to use name
> mangling, I had to reverse engineer the current implementation for the cases
> I cared about and re-implement it from scratch.


Moving the functionality out of CodeGen and into more accessible headers (say, in the AST library) is relatively easy and should be done soon.

It would be a shame if you were forced to rewrite all of name mangling because of some limitations in the current implementation. The code is complex enough and is tied to a de facto standard, so it shouldn't be duplicated unless it is absolutely necessary. Could you explain why you had to re-implement name mangling for your task?

	- Doug



More information about the cfe-dev mailing list