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 | 5f6112450fa643bd3c930b83d6ac1acfa7dda429 (patch) | |
| tree | 03ea048f11d8ab4d83327c451fc2cbd607bf93ff /llvm/lib | |
| parent | 19edda03233bd1099647c9727a8f95e5b065bb79 (diff) | |
| download | bcm5719-llvm-5f6112450fa643bd3c930b83d6ac1acfa7dda429.tar.gz bcm5719-llvm-5f6112450fa643bd3c930b83d6ac1acfa7dda429.zip | |
PR7704: A function is not allowed to return a function; make sure to enforce
this consistently.
llvm-svn: 109360
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/VMCore/Type.cpp | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/llvm/lib/VMCore/Type.cpp b/llvm/lib/VMCore/Type.cpp index b0897b4ca4a..0c9b0eaf564 100644 --- a/llvm/lib/VMCore/Type.cpp +++ b/llvm/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 | 

