On 4 Apr 2007, at 20:10, Jeff Cohen wrote:> […] > %obj = alloca %struct.TestClass, align 1 ; <%struct.TestClass*> > [#uses=1] > %tmp1 = call int %_ZN9TestClass10testMethodEi( %struct.TestClass* % > obj, int 1 ) ; <int> [#uses=0] > ret void > } > > declare int %_ZN9TestClass10testMethodEi(%struct.TestClass*, int)The name mangling is not very pretty though and it is specific to the C++ front-end. What is the best manner to deal with that problem? Luc Bourhis
Luc Bourhis wrote:> On 4 Apr 2007, at 20:10, Jeff Cohen wrote: > > >> […] >> %obj = alloca %struct.TestClass, align 1 ; <%struct.TestClass*> >> [#uses=1] >> %tmp1 = call int %_ZN9TestClass10testMethodEi( %struct.TestClass* % >> obj, int 1 ) ; <int> [#uses=0] >> ret void >> } >> >> declare int %_ZN9TestClass10testMethodEi(%struct.TestClass*, int) >> > > The name mangling is not very pretty though and it is specific to the > C++ front-end. What is the best manner to deal with that problem? > > Luc BourhisWhat exactly is the problem that needs dealing with? If you intend to link with C++ code, there is no choice but to live with it. If you are doing your own language, you can do whatever you want for names. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070404/4099c860/attachment.html>
>>> […] >>> %obj = alloca %struct.TestClass, align 1 ; <%struct.TestClass*> >>> [#uses=1] >>> %tmp1 = call int %_ZN9TestClass10testMethodEi( %struct.TestClass* % >>> obj, int 1 ) ; [#uses=0] >>> ret void >>> } >>> >>> declare int %_ZN9TestClass10testMethodEi(%struct.TestClass*, int) >>> >> The name mangling is not very pretty though and it is specific to the >> C++ front-end. What is the best manner to deal with that problem? >> >> Luc Bourhis > > What exactly is the problem that needs dealing with? > > If you intend to link with C++ code, there is no choice but to live > with it.So I did. Fair enough. Luc