PR7704: A function is not allowed to return a function; make sure to enforce
this consistently. llvm-svn: 109360
This commit is contained in:
parent
19edda0323
commit
5f6112450f
|
|
@ -455,8 +455,8 @@ const PointerType *Type::getInt64PtrTy(LLVMContext &C, unsigned AS) {
|
||||||
/// isValidReturnType - Return true if the specified type is valid as a return
|
/// isValidReturnType - Return true if the specified type is valid as a return
|
||||||
/// type.
|
/// type.
|
||||||
bool FunctionType::isValidReturnType(const Type *RetTy) {
|
bool FunctionType::isValidReturnType(const Type *RetTy) {
|
||||||
return RetTy->getTypeID() != LabelTyID &&
|
return !RetTy->isFunctionTy() && !RetTy->isLabelTy() &&
|
||||||
RetTy->getTypeID() != MetadataTyID;
|
!RetTy->isMetadataTy();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// isValidArgumentType - Return true if the specified type is valid as an
|
/// isValidArgumentType - Return true if the specified type is valid as an
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue