On Tue, Jul 29, 2014 at 5:44 PM, Argyrios Kyrtzidis <[email protected]> wrote:
> > On Jul 29, 2014, at 5:21 PM, Eli Bendersky <[email protected]> wrote: > > On Tue, Jul 29, 2014 at 5:08 PM, Argyrios Kyrtzidis <[email protected]> > wrote: > >> 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(). >> > > Hi Argyrios, > > 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. > > 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? > > > Yes, sounds good to me. > Argyrios, I uploaded a new patch that implements this. PTAL
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
