-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
Showing
4 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// RUN: %clang_cc1 -emit-llvm-only -fdump-record-layouts-complete %s | FileCheck %s | ||
|
||
struct a { | ||
int x; | ||
}; | ||
|
||
struct b { | ||
char y; | ||
} foo; | ||
|
||
class c {}; | ||
|
||
class d; | ||
|
||
// CHECK: 0 | struct a | ||
// CHECK: 0 | struct b | ||
// CHECK: 0 | class c | ||
// CHECK-NOT: 0 | class d |