mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-28 10:33:14 +01:00
Merge pull request #182 from jerro/upstream-master
Casts between vector types.
This commit is contained in:
@@ -809,6 +809,10 @@ DValue* DtoCastVector(Loc& loc, DValue* val, Type* to)
|
||||
return new DImValue(to, array);
|
||||
}
|
||||
}
|
||||
else if (totype->ty == Tvector && to->size() == val->getType()->size())
|
||||
{
|
||||
return new DImValue(to, DtoBitCast(val->getRVal(), tolltype));
|
||||
}
|
||||
else
|
||||
{
|
||||
error(loc, "invalid cast from '%s' to '%s'", val->getType()->toChars(), to->toChars());
|
||||
|
||||
Reference in New Issue
Block a user