<div>Hi, Erik</div><div><br></div><div>It seems that, your partitial Demangler is implemented basing on C++. I have to link with c++ runtime libraries if I want to use it. (i.e. you are using new/delete etc). However, I won't link with the c++ runtime libraries as I am C project. I notice that, the demangler implemented inside llvm runtime(cxa_demangler.cpp) is carefully implemented that not depending on the c++ runtime.</div><div>Would you please add the C interface and remove the dependent on the C++ runtime so that, the C project could use it ?</div><div><br></div><div>Thank you.</div><div><br></div><br><div id="origbody"><div style="background: #f2f2f2;">----- 原始邮件 -----<br>发件人:Erik Pilkington <erik.pilkington@gmail.com><br>收件人:bluedream_zqs@sina.com, cfe-dev <cfe-dev@lists.llvm.org><br>主题:Re: [cfe-dev] Public the interface for cxa_demangler.cpp<br>日期:2018年04月13日 20点54分<br></div><br>
<p>No plans as of yet! I never planned to export the AST in this
way, doing so would probably require some surgery (ie, make all
the identifiers it uses reserved). I very recently landed <a target="_blank" moz-do-not-send="true" href="http://llvm.org/viewvc/llvm-project?view=revision&revision=329951">r329951</a>,
which provides a simple opaque API to the AST for the copy of the
demangler in llvm. Maybe this is enough for your use case? What
kind of analysis are you planning on performing?</p>
Thanks,<br>
Erik<br>
<br>
<div class="">On 2018-04-13 4:22 AM, via cfe-dev
wrote:<br>
</div>
<blockquote type="cite" cite="mid:20180413082213.0B85F7200D0@webmail.sinamail.sina.com.cn"> The
file "llvm.stl/libcxxabi/src/cxa_demangler.cpp" implement the
interface "__cxa_demangle()" defined in the C++ABI. It decoded the
mangled string into the demangled one, that is, "string -->
string". Inside it, it is implemented by "string --> AST
--> string". However, someone might need the internal AST
instead of the demangled string to do the further analysis for the
mangled string. Do we have any plan not to hide the AST inside the
cxa_demangler.cpp, but public it into the cxa_demangle.h ? Thank
you. <br>
<br>
<fieldset class=""></fieldset>
<br>
<pre wrap="">_______________________________________________
cfe-dev mailing list
<a target="_blank" class="" href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>
<a target="_blank" class="" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<br>
</div>