aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/TargetInfo.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-05-15 00:00:30 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-05-15 00:00:30 +0000
commit7711523d948bbe635f690f5795ef7ea9a3289eb2 (patch)
tree437ab26aca60009037faa684379754cc697e628a /lib/CodeGen/TargetInfo.cpp
parentf0229d884da7974f40f558e8cb0b11939017fe43 (diff)
C++/ABI/i386: Member function pointers should be passed by value.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103842 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetInfo.cpp')
-rw-r--r--lib/CodeGen/TargetInfo.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp
index 09baf2e833..176a7432b0 100644
--- a/lib/CodeGen/TargetInfo.cpp
+++ b/lib/CodeGen/TargetInfo.cpp
@@ -387,10 +387,11 @@ bool X86_32ABIInfo::shouldReturnTypeInRegister(QualType Ty,
return true;
}
- // If this is a builtin, pointer, enum, or complex type, it is ok.
+ // If this is a builtin, pointer, enum, complex type, member pointer, or
+ // member function pointer it is ok.
if (Ty->getAs<BuiltinType>() || Ty->hasPointerRepresentation() ||
Ty->isAnyComplexType() || Ty->isEnumeralType() ||
- Ty->isBlockPointerType())
+ Ty->isBlockPointerType() || Ty->isMemberPointerType())
return true;
// Arrays are treated like records.