From: Fariborz Jahanian Date: Fri, 16 Jan 2009 17:41:13 +0000 (+0000) Subject: Used a more suitable api to get to the type of a record X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ab654afb2d49a9a7db2727b69708ac479728f2a1;p=clang Used a more suitable api to get to the type of a record in code gen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62326 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 628bfb0788..3b9db6a4bb 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -692,7 +692,7 @@ ScalarExprEmitter::VisitSizeOfAlignOfExpr(const SizeOfAlignOfExpr *E) { const Type *Key = CGF.getContext().getTagDeclType( const_cast(dyn_cast(RD))).getTypePtr(); - TypeToSize = Key->getDesugaredType(); + TypeToSize = QualType(Key->getAsRecordType(), 0); } std::pair Info = CGF.getContext().getTypeInfo(TypeToSize);