diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2010-07-24 22:58:04 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2010-07-24 22:58:04 +0000 |
commit | 327f4e4ab2acdc0594581825b0d0a4dca45e8acc (patch) | |
tree | 9b7c535d6cec60af2f5c82e86b37470d4f057891 | |
parent | cec36f4c1118dc8388910d4753fe7cbf88d2d793 (diff) | |
download | external_llvm-327f4e4ab2acdc0594581825b0d0a4dca45e8acc.zip external_llvm-327f4e4ab2acdc0594581825b0d0a4dca45e8acc.tar.gz external_llvm-327f4e4ab2acdc0594581825b0d0a4dca45e8acc.tar.bz2 |
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
-rw-r--r-- | lib/VMCore/Type.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index b0897b4..0c9b0ea 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -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 |