[cfe-dev] Disable #error?

Joe Groff arcata at gmail.com
Fri Jan 17 08:52:36 PST 2014

I wrote a similar tool for the Clay language a while back (
https://github.com/jckarter/clay/blob/master/tools/bindgen.clay). I was
able to use Clang's source information to filter the output to only
translate definitions from headers related to the library of interest, and
it worked well in practice without any modifications to the original
headers or hacks to Clang.


On Thu, Jan 16, 2014 at 12:25 PM, Jacob Carlborg <doob at me.com> wrote:

> On 2014-01-16 21:08, Sean Silva wrote:
>  I don't see the problem. Just parse the public umbrella header. Clang
>> keeps accurate source information and can tell you which file each
>> declaration is in, and can even tell you if a file is a system header or
>> not.
> So mean, when I process the umbrella header I would create D modules for
> the private headers included by the umbrella header?
> How do I know if the origin of a declaration is in a private header file
> or from a header file in a completely different library?
>  Also, using the private, internal organization of the library's headers
>> to determine the actual user-facing module structure of the D API seems
>> *really* unwise....
> If I managed to properly translate #include directives I should be able to
> get the same structure when translating the umbrella header. Or the user
> have to do some final tweaks manually to get the correct structure. Hmm, it
> seems very hard to, in general, do a completely automatic translation.
> --
> /Jacob Carlborg
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140117/dd271fc9/attachment.html>

More information about the cfe-dev mailing list