[llvm-commits] [llvm] r109360 - /llvm/trunk/lib/VMCore/Type.cpp
Eli Friedman
eli.friedman at gmail.com
Sat Jul 24 15:58:04 PDT 2010
Author: efriedma
Date: Sat Jul 24 17:58:04 2010
New Revision: 109360
URL: http://llvm.org/viewvc/llvm-project?rev=109360&view=rev
Log:
PR7704: A function is not allowed to return a function; make sure to enforce
this consistently.
Modified:
llvm/trunk/lib/VMCore/Type.cpp
Modified: llvm/trunk/lib/VMCore/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Type.cpp?rev=109360&r1=109359&r2=109360&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Type.cpp (original)
+++ llvm/trunk/lib/VMCore/Type.cpp Sat Jul 24 17:58:04 2010
@@ -455,8 +455,8 @@
/// 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
More information about the llvm-commits
mailing list