From 7ad11e70b65dabb7fbba8051a44d7cb612339a4a Mon Sep 17 00:00:00 2001 From: Ken Dyck Date: Tue, 15 Feb 2011 02:32:40 +0000 Subject: Convert RecordLayout::Alignment to CharUnits from bit units. No change in functionality intended. llvm-svn: 125549 --- clang/lib/AST/ASTContext.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'clang/lib/AST/ASTContext.cpp') diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index dcbfd9deec5..94f3b337275 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -632,7 +632,7 @@ CharUnits ASTContext::getDeclAlign(const Decl *D, bool RefAsPointee) const { const ASTRecordLayout &layout = getASTRecordLayout(field->getParent()); // Start with the record's overall alignment. - unsigned fieldAlign = layout.getAlignment(); + unsigned fieldAlign = toBits(layout.getAlignment()); // Use the GCD of that and the offset within the record. uint64_t offset = layout.getFieldOffset(field->getFieldIndex()); @@ -848,7 +848,7 @@ ASTContext::getTypeInfo(const Type *T) const { const ObjCInterfaceType *ObjCI = cast(T); const ASTRecordLayout &Layout = getASTObjCInterfaceLayout(ObjCI->getDecl()); Width = toBits(Layout.getSize()); - Align = Layout.getAlignment(); + Align = toBits(Layout.getAlignment()); break; } case Type::Record: @@ -867,7 +867,7 @@ ASTContext::getTypeInfo(const Type *T) const { const RecordType *RT = cast(TT); const ASTRecordLayout &Layout = getASTRecordLayout(RT->getDecl()); Width = toBits(Layout.getSize()); - Align = Layout.getAlignment(); + Align = toBits(Layout.getAlignment()); break; } -- cgit v1.2.3