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:
kai
2013-06-30 22:31:53 +02:00
parent 67a9391f79
commit bf421bdcd1
3 changed files with 11 additions and 1 deletions

View File

@@ -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);

View File

@@ -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();