summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 63e84d41313..30fe791e6d3 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -846,7 +846,7 @@ ASTContext::getTypeInfo(const Type *T) const {
case Type::ObjCInterface: {
const ObjCInterfaceType *ObjCI = cast<ObjCInterfaceType>(T);
const ASTRecordLayout &Layout = getASTObjCInterfaceLayout(ObjCI->getDecl());
- Width = Layout.getSize();
+ Width = Layout.getSize().getQuantity() * getCharWidth();
Align = Layout.getAlignment();
break;
}
@@ -865,7 +865,7 @@ ASTContext::getTypeInfo(const Type *T) const {
const RecordType *RT = cast<RecordType>(TT);
const ASTRecordLayout &Layout = getASTRecordLayout(RT->getDecl());
- Width = Layout.getSize();
+ Width = Layout.getSize().getQuantity() * getCharWidth();
Align = Layout.getAlignment();
break;
}
OpenPOWER on IntegriCloud