1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

Fix PR463

llvm-svn: 18303
This commit is contained in:
Chris Lattner 2004-11-28 16:45:45 +00:00
parent 170cb867c5
commit bf49c461ef

View File

@ -1294,7 +1294,10 @@ ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr
delete $1; delete $1;
} }
| Types ZEROINITIALIZER { | Types ZEROINITIALIZER {
$$ = Constant::getNullValue($1->get()); const Type *Ty = $1->get();
if (isa<FunctionType>(Ty) || Ty == Type::LabelTy || isa<OpaqueType>(Ty))
ThrowException("Cannot create a null initialized value of this type!");
$$ = Constant::getNullValue(Ty);
delete $1; delete $1;
}; };