[PATCH] D19088: [Draft] Possible mapping of DIBuilder in the C API

Jakob Bornecrantz via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 17 07:28:08 PDT 2016


Wallbraker added a subscriber: Wallbraker.
Wallbraker added a comment.

I'm not sure that this is worth the effort and code churn.

In the example that prompted you to post this you said that the overhead from creating all of the locations would be to big. But you do not need to create any DILocation yourself as you can Builder::SetCurrentDebugLocation and will do that for you. I will admit there will be a overhead tho since there is still quite a few bits of Metadata that needs to be wrapped.

Also you can not change the semantics of the functions, you will need to add duplicate functions for all of the metadata functions. What if llvm-c-test.c was written in D and the bindings hadn't been updated, it would have crashed in weird and wonderful ways. Types are part of the ABI.

Cheers, Jakob.


http://reviews.llvm.org/D19088





More information about the llvm-commits mailing list