aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclObjC.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST/DeclObjC.cpp')
-rw-r--r--lib/AST/DeclObjC.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp
index 27e6a6df65..50f45e8579 100644
--- a/lib/AST/DeclObjC.cpp
+++ b/lib/AST/DeclObjC.cpp
@@ -367,7 +367,7 @@ void ObjCInterfaceDecl::addInstanceVariablesToClass(ObjCIvarDecl **ivars,
/// storage which matches this 'ivar'.
///
FieldDecl *ObjCInterfaceDecl::lookupFieldDeclForIvar(ASTContext &Context,
- ObjCIvarDecl *ivar) {
+ const ObjCIvarDecl *ivar) {
assert(RecordForDecl && "lookupFieldDeclForIvar no storage for class");
DeclarationName Member = ivar->getDeclName();
DeclContext::lookup_result Lookup = RecordForDecl->lookup(Context, Member);
@@ -392,7 +392,8 @@ void ObjCInterfaceDecl::addLayoutToClass(ASTContext &Context)
for (unsigned int i = 0; i != RecFields.size(); i++) {
FieldDecl *Field = FieldDecl::Create(Context, RD, SourceLocation(),
RecFields[i]->getIdentifier(),
- RecFields[i]->getType(), 0, false, 0);
+ RecFields[i]->getType(),
+ RecFields[i]->getBitWidth(), false, 0);
RD->addDecl(Context, Field);
}
RD->completeDefinition(Context);