mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-22 15:53:14 +01:00
Fix for issue #420.
The frontend only creates a scalar literal instead of an array literal in order to initialize a vector field. This commit adds the missing code.
This commit is contained in:
@@ -3558,6 +3558,13 @@ Expression *TypeVector::defaultInit(Loc loc)
|
||||
return basetype->defaultInit(loc);
|
||||
}
|
||||
|
||||
#if IN_LLVM
|
||||
Expression *TypeVector::defaultInitLiteral(Loc loc)
|
||||
{
|
||||
return basetype->defaultInitLiteral(loc);
|
||||
}
|
||||
#endif
|
||||
|
||||
int TypeVector::isZeroInit(Loc loc)
|
||||
{
|
||||
return basetype->isZeroInit(loc);
|
||||
|
||||
@@ -482,6 +482,9 @@ struct TypeVector : Type
|
||||
int checkBoolean();
|
||||
MATCH implicitConvTo(Type *to);
|
||||
Expression *defaultInit(Loc loc);
|
||||
#if IN_LLVM
|
||||
Expression *defaultInitLiteral(Loc loc);
|
||||
#endif
|
||||
TypeBasic *elementType();
|
||||
int isZeroInit(Loc loc);
|
||||
TypeInfoDeclaration *getTypeInfoDeclaration();
|
||||
|
||||
Submodule tests/d2/dmd-testsuite updated: dbb7b9fa18...30adf9062b
Reference in New Issue
Block a user