mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-22 06:33:14 +01:00
[svn r253] Removed -inlineasm option. inline asm is now enabled by default unless the new -noasm option is passed.
Tried adding a stack trace print when compiler crashes, not sure it's working though. Changed data layouts to match that of llvm-gcc. Fixed casting function pointers. Added support checks in AsmStatement.
This commit is contained in:
@@ -1117,7 +1117,7 @@ DValue* DtoCastPtr(DValue* val, Type* to)
|
||||
|
||||
Type* totype = DtoDType(to);
|
||||
Type* fromtype = DtoDType(val->getType());
|
||||
assert(fromtype->ty == Tpointer);
|
||||
assert(fromtype->ty == Tpointer || fromtype->ty == Tfunction);
|
||||
|
||||
LLValue* rval;
|
||||
|
||||
@@ -1256,7 +1256,7 @@ DValue* DtoCast(DValue* val, Type* to)
|
||||
else if (fromtype->ty == Tarray || fromtype->ty == Tsarray) {
|
||||
return DtoCastArray(val, to);
|
||||
}
|
||||
else if (fromtype->ty == Tpointer) {
|
||||
else if (fromtype->ty == Tpointer || fromtype->ty == Tfunction) {
|
||||
return DtoCastPtr(val, to);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user