From a54570d2d2797a7a8ab33a96592232a95416eccc Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Mon, 18 Feb 2008 09:22:21 +0000 Subject: [PATCH] I got the predicate backwards in my last patch. The comment is correct, the code was not. llvm-svn: 47264 --- llvm/lib/VMCore/Function.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/VMCore/Function.cpp b/llvm/lib/VMCore/Function.cpp index e7a7041d778f..ec34abc10671 100644 --- a/llvm/lib/VMCore/Function.cpp +++ b/llvm/lib/VMCore/Function.cpp @@ -107,7 +107,7 @@ bool Argument::hasNoAliasAttr() const { /// it in its containing function. bool Argument::hasStructRetAttr() const { if (!isa(getType())) return false; - if (getArgNo()) return false; // StructRet param must be first param + if (this != getParent()->arg_begin()) return false; // StructRet param must be first param return getParent()->paramHasAttr(1, ParamAttr::StructRet); }