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 628bfb0..3b9db6a 100644
--- a/lib/CodeGen/CGExprScalar.cpp
+++ b/lib/CodeGen/CGExprScalar.cpp
@@ -692,7 +692,7 @@
     const Type *Key =
       CGF.getContext().getTagDeclType(
                     const_cast<TagDecl*>(dyn_cast<TagDecl>(RD))).getTypePtr();
-    TypeToSize = Key->getDesugaredType();
+    TypeToSize = QualType(Key->getAsRecordType(), 0);
   }  
   std::pair<uint64_t, unsigned> Info = CGF.getContext().getTypeInfo(TypeToSize);