mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-20 14:29:27 +00:00
Fix PR463
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18303 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2ded5d0053
commit
7891593359
@ -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…
x
Reference in New Issue
Block a user