iphone + LDC, a new ARM adventure

David Nadlinger code at klickverbot.at
Sat Jan 4 14:17:32 PST 2014


Hi Dan,

On Sat, Jan 4, 2014 at 10:56 PM, Dan Olson <zans.is.for.cans at yahoo.com> wrote:
> First class of error I run into is exception based. Any code that needs
> to handle exceptions gets this:
>
> Assertion failed: (getOperand(0)->getType() == cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr must be a pointer to Val type!"), function AssertOK, file /Users/dan/projects/ldc/llvm-3.3.src/lib/IR/Instructions.cpp, line 1084.

The issue is most likely that ARM/iOS uses setjmp/longjmp-based
exception handling, whereas all the other target platforms use
DWARF-based EH (or a similar concept on Win64).

I don't see any fundamental issue with using SLJL for D/LDC (besides
performance and the other generic SLJL downsides), but you'd have to
adapt druntime and also some parts of the relevant parts of the LDC
glue code (e.g. to avoid the above error).

> I have always wanted to continue this adventure, trying LDC. Apple is
> all clang/LLVM now and seems to be pushing out some of their LLVM
> updates.  So seems LDC is way to go!

If you have the time and inclination to work on iOS support for ARM,
it would be awesome if you could try to get things running. In any
case, please do feel free to ask around for help with LDC development.

Best,
David


More information about the digitalmars-d-ldc mailing list