summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorKen Dyck <kd@kendyck.com>2011-02-15 02:32:40 +0000
committerKen Dyck <kd@kendyck.com>2011-02-15 02:32:40 +0000
commit7ad11e70b65dabb7fbba8051a44d7cb612339a4a (patch)
treeb0b4931331987749a8152f0d538be2d6d170545f /clang/lib/AST/ASTContext.cpp
parent4ea9004fe8a555849f12f67600f4d5d09016d1db (diff)
downloadbcm5719-llvm-7ad11e70b65dabb7fbba8051a44d7cb612339a4a.tar.gz
bcm5719-llvm-7ad11e70b65dabb7fbba8051a44d7cb612339a4a.zip
Convert RecordLayout::Alignment to CharUnits from bit units. No change in
functionality intended. llvm-svn: 125549
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp6
1 files changed, 3 insertions, 3 deletions
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<ObjCInterfaceType>(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<RecordType>(TT);
const ASTRecordLayout &Layout = getASTRecordLayout(RT->getDecl());
Width = toBits(Layout.getSize());
- Align = Layout.getAlignment();
+ Align = toBits(Layout.getAlignment());
break;
}
OpenPOWER on IntegriCloud