diff options
author | Anders Carlsson <andersca@mac.com> | 2009-07-27 17:10:54 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-07-27 17:10:54 +0000 |
commit | cabdeb49323872c5442c60410ea7f194c7ff9139 (patch) | |
tree | 38e3bd0104fe685d64a3582091c04f2bfb8a24f8 /clang/test/CodeGenCXX/class-layout.cpp | |
parent | 1814e81e17f15afc73adb7e5b4ddc044f16b02c5 (diff) | |
download | bcm5719-llvm-cabdeb49323872c5442c60410ea7f194c7ff9139.tar.gz bcm5719-llvm-cabdeb49323872c5442c60410ea7f194c7ff9139.zip |
Use the CGRecordLayoutBuilder even if there are no fields, because in C++ an empty class will have a padding byte.
llvm-svn: 77205
Diffstat (limited to 'clang/test/CodeGenCXX/class-layout.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/class-layout.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/class-layout.cpp b/clang/test/CodeGenCXX/class-layout.cpp new file mode 100644 index 00000000000..7255d3e4f94 --- /dev/null +++ b/clang/test/CodeGenCXX/class-layout.cpp @@ -0,0 +1,5 @@ +// RUN: clang-cc %s -emit-llvm -o %t && + +// An extra byte shoudl be allocated for an empty class. +// RUN: grep '%.truct.A = type { i8 }' %t +struct A { } a; |