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:
parent
170cb867c5
commit
bf49c461ef
@ -1294,7 +1294,10 @@ ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr
|
||||
delete $1;
|
||||
}
|
||||
| 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;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user