[PATCH] libclang.dll compat with Borland compilers

Argyrios Kyrtzidis akyrtzi at gmail.com
Wed Oct 15 17:31:42 PDT 2014


> On Oct 15, 2014, at 3:23 PM, Stephen Fewer <stephen_fewer at harmonysecurity.com> wrote:
> 
> Hi,
> 
> This patch adds compatibility for using libclang.dll built with MSVC in
> Borland compiled code (C++ Builder). The 32bit Borland compiler returns
> structures > 4 bytes and < 9 bytes using a different ABI than MSVC
> emits, so to workaround this you must use a Borland specific keyword
> __msreturn as the calling convention [0].
> 
> The patch adds a define CINDEX_CC to
> .\tools\clang\include\clang-c\Platform.h, when using a Borland compiler,
> in order to specify __msreturn and then applies CINDEX_CC to all
> functions in the clang-c headers. Should have no effect for any other
> compiler.

To clarify, this can’t be folded with CINDEX_LINKAGE, it won’t compile if __msreturn  is added at the beginning ?

> 
> Regards,
> 
> - Stephen.
> 
> [0] http://docwiki.embarcadero.com/RADStudio/XE7/en/Msreturn
> <msreturn.patch>_______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits





More information about the cfe-commits mailing list