mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 06:30:16 +00:00
regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50139 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f7dedf2d85
commit
a925a14698
File diff suppressed because it is too large
Load Diff
@ -1349,12 +1349,10 @@ Types
|
|||||||
| Types '(' ArgTypeListI ')' OptFuncAttrs {
|
| Types '(' ArgTypeListI ')' OptFuncAttrs {
|
||||||
// Allow but ignore attributes on function types; this permits auto-upgrade.
|
// Allow but ignore attributes on function types; this permits auto-upgrade.
|
||||||
// FIXME: remove in LLVM 3.0.
|
// FIXME: remove in LLVM 3.0.
|
||||||
const Type* RetTy = *$1;
|
const Type *RetTy = *$1;
|
||||||
if (!(RetTy->isFirstClassType() || RetTy == Type::VoidTy ||
|
if (!FunctionType::isValidReturnType(RetTy))
|
||||||
isa<StructType>(RetTy) ||
|
GEN_ERROR("Invalid result type for LLVM function");
|
||||||
isa<OpaqueType>(RetTy)))
|
|
||||||
GEN_ERROR("LLVM Functions cannot return aggregates");
|
|
||||||
|
|
||||||
std::vector<const Type*> Params;
|
std::vector<const Type*> Params;
|
||||||
TypeWithAttrsList::iterator I = $3->begin(), E = $3->end();
|
TypeWithAttrsList::iterator I = $3->begin(), E = $3->end();
|
||||||
for (; I != E; ++I ) {
|
for (; I != E; ++I ) {
|
||||||
@ -2255,6 +2253,9 @@ FunctionHeaderH : OptCallingConv ResultTypes GlobalName '(' ArgList ')'
|
|||||||
if (!CurFun.isDeclare && CurModule.TypeIsUnresolved($2))
|
if (!CurFun.isDeclare && CurModule.TypeIsUnresolved($2))
|
||||||
GEN_ERROR("Reference to abstract result: "+ $2->get()->getDescription());
|
GEN_ERROR("Reference to abstract result: "+ $2->get()->getDescription());
|
||||||
|
|
||||||
|
if (!FunctionType::isValidReturnType(*$2))
|
||||||
|
GEN_ERROR("Invalid result type for LLVM function");
|
||||||
|
|
||||||
std::vector<const Type*> ParamTypeList;
|
std::vector<const Type*> ParamTypeList;
|
||||||
SmallVector<ParamAttrsWithIndex, 8> Attrs;
|
SmallVector<ParamAttrsWithIndex, 8> Attrs;
|
||||||
if ($7 != ParamAttr::None)
|
if ($7 != ParamAttr::None)
|
||||||
@ -2648,6 +2649,10 @@ BBTerminatorInst :
|
|||||||
GEN_ERROR("Short call syntax cannot be used with varargs");
|
GEN_ERROR("Short call syntax cannot be used with varargs");
|
||||||
ParamTypes.push_back(Ty);
|
ParamTypes.push_back(Ty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!FunctionType::isValidReturnType(*$3))
|
||||||
|
GEN_ERROR("Invalid result type for LLVM function");
|
||||||
|
|
||||||
Ty = FunctionType::get($3->get(), ParamTypes, false);
|
Ty = FunctionType::get($3->get(), ParamTypes, false);
|
||||||
PFTy = PointerType::getUnqual(Ty);
|
PFTy = PointerType::getUnqual(Ty);
|
||||||
}
|
}
|
||||||
@ -2972,6 +2977,10 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
|
|||||||
GEN_ERROR("Short call syntax cannot be used with varargs");
|
GEN_ERROR("Short call syntax cannot be used with varargs");
|
||||||
ParamTypes.push_back(Ty);
|
ParamTypes.push_back(Ty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!FunctionType::isValidReturnType(*$3))
|
||||||
|
GEN_ERROR("Invalid result type for LLVM function");
|
||||||
|
|
||||||
Ty = FunctionType::get($3->get(), ParamTypes, false);
|
Ty = FunctionType::get($3->get(), ParamTypes, false);
|
||||||
PFTy = PointerType::getUnqual(Ty);
|
PFTy = PointerType::getUnqual(Ty);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user