]> granicus.if.org Git - clang/commit
[ms-cxxabi] Implement member pointer conversions
authorReid Kleckner <reid@kleckner.net>
Thu, 9 May 2013 21:01:17 +0000 (21:01 +0000)
committerReid Kleckner <reid@kleckner.net>
Thu, 9 May 2013 21:01:17 +0000 (21:01 +0000)
commitf632730ffb0b8ca531a35e737b29cc9f9774ca1d
tree1544a64b88eba9e29ec09b6df342e95f5fd04f71
parent089db2e3af0b6166a8e2253c453eccf551ddfbd8
[ms-cxxabi] Implement member pointer conversions

Summary:
This only supports converting along non-virtual inheritance paths by
changing the field offset or the non-virtual base adjustment.

This implements three kinds of conversions:
- codegen for Value conversions
- Constant emission for APValue
- Constant folding for CastExprs

In almost all constant initialization settings
EmitMemberPointer(APValue) is called, except when the expression
contains a reinterpret cast.

reinterpret casts end up being a big corner case because the null value
changes between different kinds of member pointers.

Reviewers: rsmith

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D741

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181543 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGCXXABI.cpp
lib/CodeGen/CGCXXABI.h
lib/CodeGen/ItaniumCXXABI.cpp
lib/CodeGen/MicrosoftCXXABI.cpp
test/CodeGenCXX/microsoft-abi-member-pointers.cpp