diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-01-16 20:05:57 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-01-16 20:05:57 +0000 |
commit | 37054dd4e7d927708153184212598f759f2bac2e (patch) | |
tree | 2ef08e5601ba36c297f819aedfa9ba2842107926 /llvm/lib/Object/COFFObjectFile.cpp | |
parent | 07c3d53c889dc13bbb00559e4c68c262e20a1043 (diff) | |
download | llvm-37054dd4e7d927708153184212598f759f2bac2e.zip llvm-37054dd4e7d927708153184212598f759f2bac2e.tar.gz llvm-37054dd4e7d927708153184212598f759f2bac2e.tar.bz2 |
MS ABI: Improve selection of an inheritance model
The MSVC ABI is rather finicky about the exact representation of it's
pointer-to-member representation. The exact position of when and where
it will go with one representation versus another appears to be when it
desires the pointer-to-member to be complete.
To properly implement this in clang, do several things:
- Give up on tracking the polymorphic nature of the class. It isn't
useful to Sema and is only pertinent when choosing CodeGen-time
details like whether the field-offset can be 0 instead of -1.
- Insist on locking-in the inheritance model when we ask our
pointer-to-member type to be complete. From there, grab the
underlying CXXRecordDecl and try to make *that* complete. Once we've
done this, we can calculate it's inheritance model and apply it using
an attribute.
N.B. My first bullet point is a lie. We will eventually care about the
specifics of whether or not a CXXRecordDecl is or is not polymorphic
because MSVC compatible mangling of such things depends on it. However,
I believe we will handle this in a rather different way.
llvm-svn: 199416
Diffstat (limited to 'llvm/lib/Object/COFFObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions