<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><blockquote type="cite"><div>On Jul 29, 2014, at 5:21 PM, Eli Bendersky <<a href="mailto:eliben@google.com">eliben@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jul 29, 2014 at 5:08 PM, Argyrios Kyrtzidis <span dir="ltr"><<a href="mailto:kyrtzidis@apple.com" target="_blank">kyrtzidis@apple.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Hi Eli,</div><div>
<br>
</div><div><div>+/**</div><div>+ * \brief Represents the different available ABIs for name mangling.</div><div>+ */</div><div>+typedef enum { CXMangleABI_Itanium = 0, CXMangleABI_Microsoft = 1 } CXMangleABI;</div><div>+</div>

<div>+/**</div><div>+ * \brief Retrieve the CXString representing the mangled name of the cursor.</div><div>+ */</div><div>+CINDEX_LINKAGE CXString clang_Cursor_getMangling(CXCursor, CXMangleABI);</div></div><div><br></div>

<div>Why aren’t you just using that appropriate ABI of the translation unit that was created ? So to get the MangleContext you can just call ASTContext::createMangleContext().</div></div></blockquote><div><br></div><div>
Hi Argyrios,</div>
<div><br></div><div>Thanks for the suggestion. This is an interesting idea - I guess I have been looking at it from a different angle, thinking mostly about a simple tool that uses Clang to mangle all kinds of names (think a web interface). So I was detaching standalone symbols from their containers/TUs. </div>

<div><br></div><div>So, I suppose the same thing can be simulated with the approach you proposing, e.g. by passing a triple flag in the cmdline options to clang_createTranslationUnitFromSourceFile or something of the sort. What do you think?</div></div></div></div></div></blockquote><div><br></div><div>Yes, sounds good to me.</div><br><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">

<div><br></div><div>Eli</div><div><br></div><div><br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div style="word-wrap:break-word"><br><div><blockquote type="cite"><div><div class="h5"><div>On Jul 28, 2014, at 6:19 AM, Eli Bendersky <<a href="mailto:eliben@google.com" target="_blank">eliben@google.com</a>> wrote:</div>

<br></div></div><div><div><div class="h5"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 24, 2014 at 5:48 PM, Eli Bendersky <span dir="ltr"><<a href="mailto:eliben@google.com" target="_blank">eliben@google.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi rsmith, rengolin,<br>
<br>
Exposes a C API to name mangling for a given cursor.<br>
<br>
This is loosely based on <a href="https://gist.github.com/tritao/2766291" target="_blank">https://gist.github.com/tritao/2766291</a>, and was previously discussed on cfe-dev: <a href="http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-June/037577.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-June/037577.html</a><br>




<br>
Adding testing capability via c-index-test.<br>
<br>
<a href="http://reviews.llvm.org/D4663" target="_blank">http://reviews.llvm.org/D4663</a><br>
<br>
Files:<br>
  include/clang-c/Index.h<br>
  test/Index/print-mangled-name.cpp<br>
  tools/c-index-test/c-index-test.c<br>
  tools/libclang/CIndex.cpp<br>
  tools/libclang/libclang.exports<br>
</blockquote></div><br></div><div class="gmail_extra">Ping ?</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div></div></div></div><div class="">
_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>

</div></div></blockquote></div><br></div></blockquote></div><br></div></div>
</div></blockquote></div><br></body></html>