]> granicus.if.org Git - clang/commitdiff
Used a more suitable api to get to the type of a record
authorFariborz Jahanian <fjahanian@apple.com>
Fri, 16 Jan 2009 17:41:13 +0000 (17:41 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Fri, 16 Jan 2009 17:41:13 +0000 (17:41 +0000)
in code gen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62326 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGExprScalar.cpp

index 628bfb07885ec70d6614f1fd681de7301c02981c..3b9db6a4bb8ebfa5f58f6a191c2ce44d7926e3a4 100644 (file)
@@ -692,7 +692,7 @@ ScalarExprEmitter::VisitSizeOfAlignOfExpr(const SizeOfAlignOfExpr *E) {
     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);