[ADT] Teach alignment helpers to work correctly for abstract classes.
authorChandler Carruth <chandlerc@gmail.com>
Tue, 29 Dec 2015 09:52:41 +0000 (09:52 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 29 Dec 2015 09:52:41 +0000 (09:52 +0000)
commitdf1cf99600fdd9e2d20e4511121855eb43fb8c1e
tree9b85846f00c29eebc4028cdb676729eef9e60b92
parenta202d8ec2d13b6cf753eae44dbb4cc36542faf30
[ADT] Teach alignment helpers to work correctly for abstract classes.
This is necessary to use them as part of pointer traits and is generally
useful. I've added unit test coverage to isolate and ensure this works
correctly.

I'll watch the build bots to try to see if any compilers can't tolerate
this bit of magic (and much credit goes to Richard Smith for coming up
with this magical production!) but give a shout if you see issues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256553 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/AlignOf.h
unittests/Support/AlignOfTest.cpp