diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-04-02 18:29:43 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-04-02 18:29:43 +0000 |
| commit | 866dee4ea0b3d12cce26989846bfef052787409e (patch) | |
| tree | 083df6f3fd177c354df4d93d61bd98c5605b287c /clang/lib/CodeGen/TargetInfo.cpp | |
| parent | 30eebb0e494e923333457e0161e3fa38efcdde74 (diff) | |
| download | bcm5719-llvm-866dee4ea0b3d12cce26989846bfef052787409e.tar.gz bcm5719-llvm-866dee4ea0b3d12cce26989846bfef052787409e.zip | |
Add helper to determine if a field is a zero-length bitfield.
llvm-svn: 328999
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
| -rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 02dd21483b4..68edb325826 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -4560,7 +4560,7 @@ bool ABIInfo::isHomogeneousAggregate(QualType Ty, const Type *&Base, // For compatibility with GCC, ignore empty bitfields in C++ mode. if (getContext().getLangOpts().CPlusPlus && - FD->isBitField() && FD->getBitWidthValue(getContext()) == 0) + FD->isZeroLengthBitField(getContext())) continue; uint64_t FldMembers; @@ -6406,7 +6406,7 @@ QualType SystemZABIInfo::GetSingleElementType(QualType Ty) const { // Unlike isSingleElementStruct(), empty structure and array fields // do count. So do anonymous bitfields that aren't zero-sized. if (getContext().getLangOpts().CPlusPlus && - FD->isBitField() && FD->getBitWidthValue(getContext()) == 0) + FD->isZeroLengthBitField(getContext())) continue; // Unlike isSingleElementStruct(), arrays do not count. |

