summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGOpenMPRuntime.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2019-06-20 20:44:45 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2019-06-20 20:44:45 +0000
commit78b239ea67cf248a5c04031050c32f707f127a9d (patch)
tree23150096a3e3d50ec9a6285ddf6d170b6a61ac20 /clang/lib/CodeGen/CGOpenMPRuntime.cpp
parent60ca31a7ddabb46c9ea3762949629433c5eb4c8c (diff)
downloadbcm5719-llvm-78b239ea67cf248a5c04031050c32f707f127a9d.tar.gz
bcm5719-llvm-78b239ea67cf248a5c04031050c32f707f127a9d.zip
P0840R2: support for [[no_unique_address]] attribute
Summary: Add support for the C++2a [[no_unique_address]] attribute for targets using the Itanium C++ ABI. This depends on D63371. Reviewers: rjmccall, aaron.ballman Subscribers: dschuff, aheejin, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63451 llvm-svn: 363976
Diffstat (limited to 'clang/lib/CodeGen/CGOpenMPRuntime.cpp')
-rw-r--r--clang/lib/CodeGen/CGOpenMPRuntime.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
index 602c9a238d4..ee5f3993940 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -7811,7 +7811,7 @@ private:
for (const auto *Field : RD->fields()) {
// Fill in non-bitfields. (Bitfields always use a zero pattern, which we
// will fill in later.)
- if (!Field->isBitField()) {
+ if (!Field->isBitField() && !Field->isZeroSize(CGF.getContext())) {
unsigned FieldIndex = RL.getLLVMFieldNo(Field);
RecordLayout[FieldIndex] = Field;
}
OpenPOWER on IntegriCloud