More whitespace and naming fixup. No functionality change.

llvm-svn: 136944
This commit is contained in:
Chad Rosier 2011-08-04 23:34:15 +00:00
parent ea350180d2
commit f01a7ddcd6
3 changed files with 11 additions and 11 deletions

View File

@ -412,17 +412,17 @@ public:
/// BitfieldFollowsBitfield - return 'true" if 'FD' is a
/// bitfield which follows the bitfield 'LastFD'.
bool BitfieldFollowsBitfield(const FieldDecl *FD,
const FieldDecl *LastFD) const;
const FieldDecl *LastFD) const;
/// NoneBitfieldFollowsBitfield - return 'true" if 'FD' is not a
/// NonBitfieldFollowsBitfield - return 'true" if 'FD' is not a
/// bitfield which follows the bitfield 'LastFD'.
bool NoneBitfieldFollowsBitfield(const FieldDecl *FD,
const FieldDecl *LastFD) const;
bool NonBitfieldFollowsBitfield(const FieldDecl *FD,
const FieldDecl *LastFD) const;
/// BitfieldFollowsNoneBitfield - return 'true" if 'FD' is a
/// BitfieldFollowsNonBitfield - return 'true" if 'FD' is a
/// bitfield which follows the none bitfield 'LastFD'.
bool BitfieldFollowsNoneBitfield(const FieldDecl *FD,
const FieldDecl *LastFD) const;
bool BitfieldFollowsNonBitfield(const FieldDecl *FD,
const FieldDecl *LastFD) const;
// Access to the set of methods overridden by the given C++ method.
typedef CXXMethodVector::iterator overridden_cxx_method_iterator;

View File

@ -573,13 +573,13 @@ bool ASTContext::BitfieldFollowsBitfield(const FieldDecl *FD,
LastFD->getBitWidth()->EvaluateAsInt(*this).getZExtValue());
}
bool ASTContext::NoneBitfieldFollowsBitfield(const FieldDecl *FD,
bool ASTContext::NonBitfieldFollowsBitfield(const FieldDecl *FD,
const FieldDecl *LastFD) const {
return (!FD->isBitField() && LastFD && LastFD->isBitField() &&
LastFD->getBitWidth()->EvaluateAsInt(*this).getZExtValue());
}
bool ASTContext::BitfieldFollowsNoneBitfield(const FieldDecl *FD,
bool ASTContext::BitfieldFollowsNonBitfield(const FieldDecl *FD,
const FieldDecl *LastFD) const {
return (FD->isBitField() && LastFD && !LastFD->isBitField() &&
FD->getBitWidth()->EvaluateAsInt(*this).getZExtValue());

View File

@ -1270,8 +1270,8 @@ void RecordLayoutBuilder::LayoutFields(const RecordDecl *D) {
continue;
// FIXME. streamline these conditions into a simple one.
else if (Context.BitfieldFollowsBitfield(FD, LastFD) ||
Context.BitfieldFollowsNoneBitfield(FD, LastFD) ||
Context.NoneBitfieldFollowsBitfield(FD, LastFD)) {
Context.BitfieldFollowsNonBitfield(FD, LastFD) ||
Context.NonBitfieldFollowsBitfield(FD, LastFD)) {
// 1) Adjacent bit fields are packed into the same 1-, 2-, or
// 4-byte allocation unit if the integral types are the same
// size and if the next bit field fits into the current