From ab654afb2d49a9a7db2727b69708ac479728f2a1 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Fri, 16 Jan 2009 17:41:13 +0000 Subject: 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 --- lib/CodeGen/CGExprScalar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/CodeGen/CGExprScalar.cpp') 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); -- cgit v1.2.3