[cfe-dev] undecorated names as comment
Chris Lattner
clattner at apple.com
Mon Feb 8 12:55:07 PST 2010
On Feb 8, 2010, at 12:51 PM, Ivan Sorokin wrote:
> Hi!
>
> What do you think about possibility to write in .s files undecorated
> names as comment before definition of function and call of function
> and
> other references to function?
This would have to happen in the LLVM .ll printer which lives in
VMCore, it is what prdouces this output. I think a better solution is
to just run the .ll file through c++filt, which will demangle them.
-Chris
>
> For example, instead of
>
> define available_externally void
> @_ZNSt9basic_iosIcSt11char_traitsIcEED2Ev(%"class.std::basic_ios"*
> %this) nounwind align 2 {
> entry:
> %0 = bitcast %"class.std::basic_ios"* %this to
> %"class.std::ios_base"* ; <%"class.std::ios_base"*> [#uses=1]
> call void @_ZNSt8ios_baseD2Ev(%"class.std::ios_base"* %0) nounwind
> ret void
> }
>
> write:
>
> ; std::basic_ios<char, std::char_traits<char> >::~basic_ios()
> define available_externally void
> @_ZNSt9basic_iosIcSt11char_traitsIcEED2Ev(%"class.std::basic_ios"*
> %this) nounwind align 2 {
> entry:
> %0 = bitcast %"class.std::basic_ios"* %this to
> %"class.std::ios_base"* ; <%"class.std::ios_base"*> [#uses=1]
> ; std::ios_base::~ios_base()
> call void @_ZNSt8ios_baseD2Ev(%"class.std::ios_base"* %0) nounwind
> ret void
> }
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list