[AIX] Check for typedef properly when getting preferred type align
authorSteven Wan <wanyu9511@gmail.com>
Wed, 8 Sep 2021 20:21:39 +0000 (16:21 -0400)
committerSteven Wan <wanyu9511@gmail.com>
Wed, 8 Sep 2021 20:21:52 +0000 (16:21 -0400)
commit806ff3c4a42c7393a0bbeab3dd1c0295f61ad457
tree36ca99de88398f4c40a0925ca255e306aa2565c1
parentb493124ae2de5074acc8207155274f84732cd06b
[AIX] Check for typedef properly when getting preferred type align

The current check for typedef is naive and doesn't deal with any convoluted cases. This patch makes use of the new 'AlignRequirement' enum field from 'TypeInfo' to determine whether or not this is an 'aligned' attribute on a typedef.

Reviewed By: rjmccall

Differential Revision: https://reviews.llvm.org/D109387
clang/lib/AST/ASTContext.cpp
clang/test/Layout/aix-power-alignment-typedef-2.cpp