aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGRecordLayoutBuilder.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-11-24 19:57:04 +0000
committerAnders Carlsson <andersca@mac.com>2010-11-24 19:57:04 +0000
commit3379e9bd71c0e0051bd97e90d4f2ec964078091d (patch)
tree9d0db55bff31f6957cd1bc78be6d1c041cb566c1 /lib/CodeGen/CGRecordLayoutBuilder.cpp
parent82926963cccbc54bc707d5dcf79389166046ef08 (diff)
Simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120109 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGRecordLayoutBuilder.cpp')
-rw-r--r--lib/CodeGen/CGRecordLayoutBuilder.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/CodeGen/CGRecordLayoutBuilder.cpp b/lib/CodeGen/CGRecordLayoutBuilder.cpp
index ce42a6aaaa..f846fca506 100644
--- a/lib/CodeGen/CGRecordLayoutBuilder.cpp
+++ b/lib/CodeGen/CGRecordLayoutBuilder.cpp
@@ -140,9 +140,6 @@ private:
unsigned getTypeAlignment(const llvm::Type *Ty) const;
- /// getCGRecordLayout - Return the CGRecordLayout for the given record.
- const CGRecordLayout &getCGRecordLayout(const CXXRecordDecl *RD);
-
/// CheckZeroInitializable - Check if the given type contains a pointer
/// to data member.
void CheckZeroInitializable(QualType T);
@@ -689,15 +686,6 @@ unsigned CGRecordLayoutBuilder::getTypeAlignment(const llvm::Type *Ty) const {
return Types.getTargetData().getABITypeAlignment(Ty);
}
-const CGRecordLayout &
-CGRecordLayoutBuilder::getCGRecordLayout(const CXXRecordDecl *RD) {
- // FIXME: It would be better if there was a way to explicitly compute the
- // record layout instead of converting to a type.
- Types.ConvertTagDeclType(RD);
-
- return Types.getCGRecordLayout(RD);
-}
-
void CGRecordLayoutBuilder::CheckZeroInitializable(QualType T) {
// This record already contains a member pointer.
if (!IsZeroInitializable)
@@ -723,7 +711,7 @@ void CGRecordLayoutBuilder::CheckZeroInitializable(const CXXRecordDecl *RD) {
if (!IsZeroInitializable)
return;
- const CGRecordLayout &Layout = getCGRecordLayout(RD);
+ const CGRecordLayout &Layout = Types.getCGRecordLayout(RD);
if (!Layout.isZeroInitializable())
IsZeroInitializable = false;
}