[MS ABI] Make member pointers return true for isIncompleteType

The type of a member pointer is incomplete if it has no inheritance
model.  This lets us reuse more general logic already embedded in clang.

llvm-svn: 247346
This commit is contained in:
David Majnemer
2015-09-10 21:52:00 +00:00
parent e0b44040aa
commit 9df56372e8
9 changed files with 40 additions and 43 deletions

View File

@@ -117,7 +117,7 @@ CharUnits CodeGenFunction::getNaturalTypeAlignment(QualType T,
if (Source) *Source = AlignmentSource::Type;
CharUnits Alignment;
if (!CGM.getCXXABI().isTypeInfoCalculable(T)) {
if (T->isIncompleteType()) {
Alignment = CharUnits::One(); // Shouldn't be used, but pessimistic is best.
} else {
// For C++ class pointees, we don't know whether we're pointing at a