[RecordLayout] Fix ItaniumRecordLayoutBuilder so that is grabs the correct bases...
authorshafik <syaghmour@apple.com>
Wed, 8 Jul 2020 17:02:13 +0000 (10:02 -0700)
committershafik <syaghmour@apple.com>
Wed, 8 Jul 2020 17:07:15 +0000 (10:07 -0700)
commit63b0f8c788d8c6978feb099fd6db8fe219c4d166
treec65848147437af30f26df06e4396205f5822d0f3
parentf69acb2af85ae71b823a15c6f73e50d4b90111b5
[RecordLayout] Fix ItaniumRecordLayoutBuilder so that is grabs the correct bases class offsets from the external source

Currently the ItaniumRecordLayoutBuilder when laying out base classes has the virtual
and non-virtual bases mixed up when pulling the base class layouts from the external source.

This came up in an LLDB bug where on arm64 because of differences in how it deals with
tail padding would layout the bases differently without the correct layout from the
external source (LLDB). This would result in some fields being off by 4 bytes.

Differential Revision: https://reviews.llvm.org/D83008
clang/lib/AST/RecordLayoutBuilder.cpp
lldb/test/API/lang/cpp/alignas_base_class/Makefile [new file with mode: 0644]
lldb/test/API/lang/cpp/alignas_base_class/TestAlignAsBaseClass.py [new file with mode: 0644]
lldb/test/API/lang/cpp/alignas_base_class/main.cpp [new file with mode: 0644]