forked from OSchip/llvm-project
parent
6c4bc99c44
commit
14f9994562
|
@ -4194,7 +4194,7 @@ yyreduce:
|
|||
{
|
||||
if (!UpRefs.empty())
|
||||
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (1)].TypeVal))->getDescription());
|
||||
if (!(*(yyvsp[(1) - (1)].TypeVal))->isFirstClassType() && (*(yyvsp[(1) - (1)].TypeVal))->getTypeID() != Type::StructTyID)
|
||||
if (!(*(yyvsp[(1) - (1)].TypeVal))->isFirstClassType() && !isa<StructType>((yyvsp[(1) - (1)].TypeVal)->get()))
|
||||
GEN_ERROR("LLVM functions cannot return aggregate types");
|
||||
(yyval.TypeVal) = (yyvsp[(1) - (1)].TypeVal);
|
||||
;}
|
||||
|
|
|
@ -1462,7 +1462,7 @@ ResultTypes
|
|||
: Types {
|
||||
if (!UpRefs.empty())
|
||||
GEN_ERROR("Invalid upreference in type: " + (*$1)->getDescription());
|
||||
if (!(*$1)->isFirstClassType() && (*$1)->getTypeID() != Type::StructTyID)
|
||||
if (!(*$1)->isFirstClassType() && !isa<StructType>($1->get()))
|
||||
GEN_ERROR("LLVM functions cannot return aggregate types");
|
||||
$$ = $1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue