aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/TargetInfo.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-05-15 00:00:37 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-05-15 00:00:37 +0000
commit67d438d39a1cc37c372a2684dc354f58d0169bb1 (patch)
treeee4c1bcdd7463b5190a1db0f5d61d7c665a10e37 /lib/CodeGen/TargetInfo.cpp
parent7711523d948bbe635f690f5795ef7ea9a3289eb2 (diff)
C++/ABI/x86_64: Member pointers should be classified as INTEGER.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103843 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetInfo.cpp')
-rw-r--r--lib/CodeGen/TargetInfo.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp
index 176a7432b0..4a0a298c3b 100644
--- a/lib/CodeGen/TargetInfo.cpp
+++ b/lib/CodeGen/TargetInfo.cpp
@@ -853,6 +853,11 @@ void X86_64ABIInfo::classify(QualType Ty,
classify(ET->getDecl()->getIntegerType(), Context, OffsetBase, Lo, Hi);
} else if (Ty->hasPointerRepresentation()) {
Current = Integer;
+ } else if (Ty->isMemberPointerType()) {
+ if (Ty->isMemberFunctionPointerType())
+ Lo = Hi = Integer;
+ else
+ Current = Integer;
} else if (const VectorType *VT = Ty->getAs<VectorType>()) {
uint64_t Size = Context.getTypeSize(VT);
if (Size == 32) {