aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-02-18 09:22:21 +0000
committerOwen Anderson <resistor@mac.com>2008-02-18 09:22:21 +0000
commit8665298d322769f7693ce9528d015e0f18e43103 (patch)
tree78306e948cc5d434166416ac5fc3dcbfb8079be9
parent528ef0d05f306eb684350fb5535fb2872c3a1df8 (diff)
downloadexternal_llvm-8665298d322769f7693ce9528d015e0f18e43103.zip
external_llvm-8665298d322769f7693ce9528d015e0f18e43103.tar.gz
external_llvm-8665298d322769f7693ce9528d015e0f18e43103.tar.bz2
I got the predicate backwards in my last patch. The comment is correct, the code was not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47264 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/Function.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp
index e7a7041..ec34abc 100644
--- a/lib/VMCore/Function.cpp
+++ b/lib/VMCore/Function.cpp
@@ -107,7 +107,7 @@ bool Argument::hasNoAliasAttr() const {
/// 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);
}