From: Fariborz Jahanian Date: Fri, 16 Jan 2009 19:02:53 +0000 (+0000) Subject: Changed the API yet again. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1522bc80df0a10517bc667c733a918f88dea0b89;p=clang Changed the API yet again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62335 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 3b9db6a4bb..d6cc16c10a 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -688,11 +688,9 @@ ScalarExprEmitter::VisitSizeOfAlignOfExpr(const SizeOfAlignOfExpr *E) { } if (TypeToSize->isObjCInterfaceType()) { ObjCInterfaceDecl *OI = TypeToSize->getAsObjCInterfaceType()->getDecl(); - const RecordDecl *RD = CGF.getContext().addRecordToClass(OI); - const Type *Key = - CGF.getContext().getTagDeclType( - const_cast(dyn_cast(RD))).getTypePtr(); - TypeToSize = QualType(Key->getAsRecordType(), 0); + RecordDecl *RD = const_cast( + CGF.getContext().addRecordToClass(OI)); + TypeToSize = CGF.getContext().getTagDeclType(static_cast(RD)); } std::pair Info = CGF.getContext().getTypeInfo(TypeToSize);