Dmitry N. Mikushin
2012-Jul-31 21:46 UTC
[LLVMdev] How to create a mangler instance from target machine?
Dear LLVM, Might be a easy question for someone, but not for me now. Consider there is a TargetMachine instance. Having this target, how could you get a corresponding Mangler class instance? Mangler depends on MCContext, which is connected with LLVMTargetMachine inherited from TargetMachine. However, LLVMTargetMachine is only available for targets machines implementations, and not available externally. How to solve this? Thanks, - Dima. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120731/81d6c02d/attachment.html>
Dmitry N. Mikushin
2012-Aug-02 04:50 UTC
[LLVMdev] How to create a mangler instance from target machine?
Dear LLVM, Sorry, maybe the question was not clear. Here's an example. Consider an LLVM user supplies a function called "function.with.dots" to backend. Backend generates an object containing symbol "function_2E_with_2E_dots". This is the effect of Mangler in work! Question: how user is supposed to know about this name change at LLVM user level, i.e. without digging into backend internals? I'm trying to create my own instance of Mangler, but there is no MCContext around. Is it the right way to go? What could be done in this case? - Dima. 2012/7/31 Dmitry N. Mikushin <maemarcus at gmail.com>:> Dear LLVM, > > Might be a easy question for someone, but not for me now. Consider there is > a TargetMachine instance. Having this target, how could you get a > corresponding Mangler class instance? > > Mangler depends on MCContext, which is connected with LLVMTargetMachine > inherited from TargetMachine. However, LLVMTargetMachine is only available > for targets machines implementations, and not available externally. > > How to solve this? > > Thanks, > - Dima. >