mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-22 02:05:01 +00:00
PR7704: A function is not allowed to return a function; make sure to enforce
this consistently. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109360 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cec36f4c11
commit
327f4e4ab2
@ -455,8 +455,8 @@ const PointerType *Type::getInt64PtrTy(LLVMContext &C, unsigned AS) {
|
||||
/// isValidReturnType - Return true if the specified type is valid as a return
|
||||
/// type.
|
||||
bool FunctionType::isValidReturnType(const Type *RetTy) {
|
||||
return RetTy->getTypeID() != LabelTyID &&
|
||||
RetTy->getTypeID() != MetadataTyID;
|
||||
return !RetTy->isFunctionTy() && !RetTy->isLabelTy() &&
|
||||
!RetTy->isMetadataTy();
|
||||
}
|
||||
|
||||
/// isValidArgumentType - Return true if the specified type is valid as an
|
||||
|
Loading…
x
Reference in New Issue
Block a user