Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
April 24, 2015 LDC in D | ||||
---|---|---|---|---|
| ||||
I know there's been developments in C++/D interop. I'm wondering what parts are missing to be able to use the LLVM IR Codegeneration libraries in a D application? I figured I'd ask the LDC guys since you have experience with both LLVM and D. Thanks. |
April 24, 2015 Re: LDC in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan Marler | You mean llvm bindings? https://github.com/deadalnix/SDC/tree/master/libd-llvm/import/llvm/c |
April 24, 2015 Re: LDC in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan Marler | On Friday, 24 April 2015 at 05:36:10 UTC, Jonathan Marler wrote:
> I know there's been developments in C++/D interop. I'm wondering what parts are missing to be able to use the LLVM IR Codegeneration libraries in a D application? I figured I'd ask the LDC guys since you have experience with both LLVM and D. Thanks.
Hi Jonathan!
There are several D bindings for LLVM which you can use.
The drawback is that they all use the C interface which is sometimes a bit limited. I am not aware that there is a binding for the C++ interface.
Regards,
Kai
|
April 24, 2015 Re: LDC in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kagamin | On Friday, 24 April 2015 at 07:33:10 UTC, Kagamin wrote:
> You mean llvm bindings? https://github.com/deadalnix/SDC/tree/master/libd-llvm/import/llvm/c
So is SDC just a rewrite of LDC in D?
|
April 24, 2015 Re: LDC in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan Marler | On Friday, 24 April 2015 at 13:24:31 UTC, Jonathan Marler wrote:
> On Friday, 24 April 2015 at 07:33:10 UTC, Kagamin wrote:
>> You mean llvm bindings? https://github.com/deadalnix/SDC/tree/master/libd-llvm/import/llvm/c
>
> So is SDC just a rewrite of LDC in D?
No, SDC is a D compiler written from scratch in D, using LLVM as backend library.
As LLVM is written in C/C++ bindings are required to use it with D. The SDC binding is one of several existing D bindings for LLVM.
Regards,
Kai
|
April 24, 2015 Re: LDC in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kai Nacke | "Kai Nacke" <kai@redstar.de> writes: > > There are several D bindings for LLVM which you can use. > The drawback is that they all use the C interface which is sometimes a > bit limited. I am not aware that there is a binding for the C++ > interface. Kai, Just curious. When LDC moves to DDMD, is the plan to continue to use the LLVM C++ interface, perhaps making the C++ glue layer simple enough that D can handle properly, or will there be a switch to the LLVM C interface? -- Dan |
April 27, 2015 Re: LDC in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dan Olson | On Friday, 24 April 2015 at 15:33:36 UTC, Dan Olson wrote:
> Kai, Just curious. When LDC moves to DDMD, is the plan to continue to
> use the LLVM C++ interface, perhaps making the C++ glue layer simple
> enough that D can handle properly, or will there be a switch to the LLVM
> C interface?
Hi Dan!
I think that the C interface of LLVM does not expose all the stuff LDC is using. We will end with having a C++ glue layer. This could also have a good side effect: we can try to encapsulate the API differences in the glue layer.
Regards,
Kai
|
Copyright © 1999-2021 by the D Language Foundation