summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCXXABI.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-02-03 08:15:49 +0000
committerJohn McCall <rjmccall@apple.com>2011-02-03 08:15:49 +0000
commitf3a8860ee1031a56ba05d9a33840e6a6a9dd3854 (patch)
treed44e28d27fc630f1256ffc033d9c8221cdf97b1a /clang/lib/CodeGen/CGCXXABI.cpp
parent981ca313d7f5ffe701836ff3dc2c13e99e106e77 (diff)
downloadbcm5719-llvm-f3a8860ee1031a56ba05d9a33840e6a6a9dd3854.tar.gz
bcm5719-llvm-f3a8860ee1031a56ba05d9a33840e6a6a9dd3854.zip
More capturing of 'this': implicit member expressions. Getting that
right for anonymous struct/union members led to me discovering some seemingly broken code in that area of Sema, which I fixed, partly by changing the representation of member pointer constants so that IndirectFieldDecls aren't expanded. This led to assorted cleanups with member pointers in CodeGen, and while I was doing that I saw some random other things to clean up. llvm-svn: 124785
Diffstat (limited to 'clang/lib/CodeGen/CGCXXABI.cpp')
-rw-r--r--clang/lib/CodeGen/CGCXXABI.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGCXXABI.cpp b/clang/lib/CodeGen/CGCXXABI.cpp
index 7fb1ffde2d0..8373b660b2f 100644
--- a/clang/lib/CodeGen/CGCXXABI.cpp
+++ b/clang/lib/CodeGen/CGCXXABI.cpp
@@ -105,10 +105,9 @@ llvm::Constant *CGCXXABI::EmitMemberPointer(const CXXMethodDecl *MD) {
MD->getParent()->getTypeForDecl()));
}
-llvm::Constant *CGCXXABI::EmitMemberPointer(const FieldDecl *FD) {
- return GetBogusMemberPointer(CGM,
- CGM.getContext().getMemberPointerType(FD->getType(),
- FD->getParent()->getTypeForDecl()));
+llvm::Constant *CGCXXABI::EmitMemberDataPointer(const MemberPointerType *MPT,
+ CharUnits offset) {
+ return GetBogusMemberPointer(CGM, QualType(MPT, 0));
}
bool CGCXXABI::isZeroInitializable(const MemberPointerType *MPT) {
OpenPOWER on IntegriCloud