objective-c IRGen. Fixes a getter synthesis bug

where getter type is super class of its property 
type, resulting in an assert. // rdar://11323676


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155663 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Fariborz Jahanian 2012-04-26 21:33:14 +00:00
Родитель 6ea4841da1
Коммит 52c18b0933
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -859,7 +859,7 @@ CodeGenFunction::generateObjCGetterBody(const ObjCImplementationDecl *classImpl,
// always objects so we don't need to worry about complex or
// aggregates.
RV = RValue::get(Builder.CreateBitCast(RV.getScalarVal(),
getTypes().ConvertType(propType)));
getTypes().ConvertType(getterMethod->getResultType())));
EmitReturnOfRValue(RV, propType);