[PATCH] Expose name mangling to libclang

Argyrios Kyrtzidis kyrtzidis at apple.com
Tue Jul 29 17:08:15 PDT 2014


Hi Eli,

+/**
+ * \brief Represents the different available ABIs for name mangling.
+ */
+typedef enum { CXMangleABI_Itanium = 0, CXMangleABI_Microsoft = 1 } CXMangleABI;
+
+/**
+ * \brief Retrieve the CXString representing the mangled name of the cursor.
+ */
+CINDEX_LINKAGE CXString clang_Cursor_getMangling(CXCursor, CXMangleABI);

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().

> On Jul 28, 2014, at 6:19 AM, Eli Bendersky <eliben at google.com> wrote:
> 
> 
> 
> 
> On Thu, Jul 24, 2014 at 5:48 PM, Eli Bendersky <eliben at google.com> wrote:
> Hi rsmith, rengolin,
> 
> Exposes a C API to name mangling for a given cursor.
> 
> This is loosely based on https://gist.github.com/tritao/2766291, and was previously discussed on cfe-dev: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-June/037577.html
> 
> Adding testing capability via c-index-test.
> 
> http://reviews.llvm.org/D4663
> 
> Files:
>   include/clang-c/Index.h
>   test/Index/print-mangled-name.cpp
>   tools/c-index-test/c-index-test.c
>   tools/libclang/CIndex.cpp
>   tools/libclang/libclang.exports
> 
> Ping ?
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140729/eecd552c/attachment.html>


More information about the cfe-commits mailing list