[clang] Add cc1 option for dumping layout for all complete types
authorDavid Tenty <daltenty@ibm.com>
Mon, 21 Jun 2021 19:37:10 +0000 (15:37 -0400)
committerDavid Tenty <daltenty@ibm.com>
Tue, 22 Jun 2021 20:27:26 +0000 (16:27 -0400)
commit7942ebdf01b35fae240cd8a0550a3da9f03615c4
treeeea5d3dced68762e0ae5a0459c9049455bf59a4d
parent422adaa879b2de5a682eaed1a4f7cf86e9ea12b4
[clang] Add cc1 option for dumping layout for all complete types

This change adds an option which, in addition to dumping the record
layout as is done by -fdump-record-layouts, causes us to compute the
layout for all complete record types (rather than the as-needed basis
which is usually done by clang), so that we will dump them as well.
This is useful if we are looking for layout differences across large
code bases without needing to instantiate every type we are interested in.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D104484
clang/include/clang/Basic/LangOptions.def
clang/include/clang/Driver/Options.td
clang/lib/AST/Decl.cpp
clang/test/Layout/dump-complete.cpp [new file with mode: 0644]