mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-06 20:32:19 +00:00
allow opaque undefs. This resolves PR3282 and fixes
test/Assembler/2005-05-05-OpaqueUndefValues.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61719 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2c1623ae0b
commit
0b61635063
@ -1913,7 +1913,8 @@ bool LLParser::ConvertGlobalValIDToValue(const Type *Ty, ValID &ID,
|
||||
return false;
|
||||
case ValID::t_Undef:
|
||||
// FIXME: LabelTy should not be a first-class type.
|
||||
if (!Ty->isFirstClassType() || Ty == Type::LabelTy)
|
||||
if ((!Ty->isFirstClassType() || Ty == Type::LabelTy) &&
|
||||
!isa<OpaqueType>(Ty))
|
||||
return Error(ID.Loc, "invalid type for undef constant");
|
||||
V = UndefValue::get(Ty);
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user