Mercurial > projects > ldc
diff gen/tollvm.cpp @ 237:a168a2c3ea48 trunk
[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.
author | lindquist |
---|---|
date | Sun, 08 Jun 2008 19:09:24 +0200 |
parents | 0806379a5eca |
children | a95056b3c996 |
line wrap: on
line diff
--- a/gen/tollvm.cpp Sun Jun 08 18:20:48 2008 +0200 +++ b/gen/tollvm.cpp Sun Jun 08 19:09:24 2008 +0200 @@ -1117,7 +1117,7 @@ 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 @@ 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 {