[cfe-commits] r117883 - /cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
Anders Carlsson
andersca at mac.com
Sun Oct 31 17:21:58 PDT 2010
Author: andersca
Date: Sun Oct 31 19:21:58 2010
New Revision: 117883
URL: http://llvm.org/viewvc/llvm-project?rev=117883&view=rev
Log:
Get rid of more calls to getBaseClassOffsetInBits.
Modified:
cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
Modified: cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/RecordLayoutBuilder.cpp?rev=117883&r1=117882&r2=117883&view=diff
==============================================================================
--- cfe/trunk/lib/AST/RecordLayoutBuilder.cpp (original)
+++ cfe/trunk/lib/AST/RecordLayoutBuilder.cpp Sun Oct 31 19:21:58 2010
@@ -244,8 +244,7 @@
if (Base->IsVirtual)
continue;
- CharUnits BaseOffset =
- Offset + toCharUnits(Layout.getBaseClassOffsetInBits(Base->Class));
+ CharUnits BaseOffset = Offset + Layout.getBaseClassOffset(Base->Class);
if (!CanPlaceBaseSubobjectAtOffset(Base, BaseOffset))
return false;
@@ -297,8 +296,7 @@
if (Base->IsVirtual)
continue;
- CharUnits BaseOffset =
- Offset + toCharUnits(Layout.getBaseClassOffsetInBits(Base->Class));
+ CharUnits BaseOffset = Offset + Layout.getBaseClassOffset(Base->Class);
UpdateEmptyBaseSubobjects(Base, BaseOffset, PlacingEmptyBase);
}
@@ -362,8 +360,7 @@
const CXXRecordDecl *BaseDecl =
cast<CXXRecordDecl>(I->getType()->getAs<RecordType>()->getDecl());
- CharUnits BaseOffset =
- Offset + toCharUnits(Layout.getBaseClassOffsetInBits(BaseDecl));
+ CharUnits BaseOffset = Offset + Layout.getBaseClassOffset(BaseDecl);
if (!CanPlaceFieldSubobjectAtOffset(BaseDecl, Class, BaseOffset))
return false;
}
@@ -476,8 +473,7 @@
const CXXRecordDecl *BaseDecl =
cast<CXXRecordDecl>(I->getType()->getAs<RecordType>()->getDecl());
- CharUnits BaseOffset =
- Offset + toCharUnits(Layout.getBaseClassOffsetInBits(BaseDecl));
+ CharUnits BaseOffset = Offset + Layout.getBaseClassOffset(BaseDecl);
UpdateEmptyFieldSubobjects(BaseDecl, Class, BaseOffset);
}
@@ -1065,8 +1061,7 @@
if (Base->IsVirtual)
continue;
- CharUnits BaseOffset =
- Offset + toCharUnits(Layout.getBaseClassOffsetInBits(Base->Class));
+ CharUnits BaseOffset = Offset + Layout.getBaseClassOffset(Base->Class);
AddPrimaryVirtualBaseOffsets(Base, BaseOffset);
}
}
More information about the cfe-commits
mailing list