iphone + LDC, a new ARM adventure
Dan Olson
zans.is.for.cans at yahoo.com
Thu Jan 9 00:39:26 PST 2014
"Kai Nacke" <kai at redstar.de> writes:
> On Wednesday, 8 January 2014 at 17:39:19 UTC, Dan Olson wrote:
>> I looked at what clang does different on i686-apple-darwin and
>> arm-apple-darwin and one thing that changed when targeting ios is a
>> bitcast on the personality function. So I edited the results of
>> ldc2
>> -output-l:
>>
>> From:
>> %landing_pad = landingpad { i8*, i32 } personality i32 (i32, i32,
>> i64, i8*, i8*)* @_d_eh_personality
>>
>> To:
>> %landing_pad = landingpad { i8*, i32 } personality i8* bitcast
>> (i32 (i32, i32, i64, i8*, i8*)* @_d_eh_personality to i8*)
>>
>> Then ran llc on the modified file. No assertion and I get arm
>> assemble
>> code! And it looks reasonable to my untrained eye.
>
> Did you get an assertion without the bitcast? This should work,
> too. If not then it is an LLVM bug.
Yes. It is this one.
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.
More information about the digitalmars-d-ldc
mailing list