diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2011-05-04 18:51:37 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-05-04 18:51:37 +0000 |
| commit | 84335f7c8eee07362271a5499341fa724ef17e03 (patch) | |
| tree | 5df60058d1e890c3035f0629daeb4a1b591e8930 /clang/lib/AST/ASTContext.cpp | |
| parent | 2998e6ce46ebe07c7cc658113fb9ac57df5e1a37 (diff) | |
| download | bcm5719-llvm-84335f7c8eee07362271a5499341fa724ef17e03.tar.gz bcm5719-llvm-84335f7c8eee07362271a5499341fa724ef17e03.zip | |
More ms_struct bitfield stuff:
Adjacent bit fields are packed into the same 1-, 2-, or
4-byte allocation unit if the integral types are the same
size. // rdar://8823265.
llvm-svn: 130851
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
| -rw-r--r-- | clang/lib/AST/ASTContext.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 287c8b2af6e..717c3a8ffee 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -551,6 +551,13 @@ bool ASTContext::ZeroBitfieldFollowsBitfield(const FieldDecl *FD, } +bool ASTContext::BitfieldFollowsBitfield(const FieldDecl *FD, + const FieldDecl *LastFD) const { + return (FD->isBitField() && LastFD && LastFD->isBitField() && + FD->getBitWidth()-> EvaluateAsInt(*this).getZExtValue() && + LastFD->getBitWidth()-> EvaluateAsInt(*this).getZExtValue()); +} + ASTContext::overridden_cxx_method_iterator ASTContext::overridden_methods_begin(const CXXMethodDecl *Method) const { llvm::DenseMap<const CXXMethodDecl *, CXXMethodVector>::const_iterator Pos |

