[llvm-commits] [llvm] r47264 - /llvm/trunk/lib/VMCore/Function.cpp

Owen Anderson resistor at mac.com
Mon Feb 18 01:22:21 PST 2008


Author: resistor
Date: Mon Feb 18 03:22:21 2008
New Revision: 47264

URL: http://llvm.org/viewvc/llvm-project?rev=47264&view=rev
Log:
I got the predicate backwards in my last patch.  The comment is correct, the code was not.

Modified:
    llvm/trunk/lib/VMCore/Function.cpp

Modified: llvm/trunk/lib/VMCore/Function.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Function.cpp?rev=47264&r1=47263&r2=47264&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/Function.cpp (original)
+++ llvm/trunk/lib/VMCore/Function.cpp Mon Feb 18 03:22:21 2008
@@ -107,7 +107,7 @@
 /// it in its containing function.
 bool Argument::hasStructRetAttr() const {
   if (!isa<PointerType>(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);
 }
 





More information about the llvm-commits mailing list