diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-01-16 19:02:53 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-01-16 19:02:53 +0000 |
commit | 1522bc80df0a10517bc667c733a918f88dea0b89 (patch) | |
tree | 5d3c1870c04282d00b455f9fd3ab90a6d0e19667 /lib/CodeGen/CGExprScalar.cpp | |
parent | 172e336b12fa32a1737f66d77a3f2de86f9cc8e8 (diff) |
Changed the API yet again.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62335 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r-- | lib/CodeGen/CGExprScalar.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
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<TagDecl*>(dyn_cast<TagDecl>(RD))).getTypePtr(); - TypeToSize = QualType(Key->getAsRecordType(), 0); + RecordDecl *RD = const_cast<RecordDecl*>( + CGF.getContext().addRecordToClass(OI)); + TypeToSize = CGF.getContext().getTagDeclType(static_cast<TagDecl*>(RD)); } std::pair<uint64_t, unsigned> Info = CGF.getContext().getTypeInfo(TypeToSize); |