[cfe-commits] r120110 - /cfe/trunk/lib/CodeGen/CodeGenTypes.cpp

Anders Carlsson andersca at mac.com
Wed Nov 24 12:05:21 PST 2010


Author: andersca
Date: Wed Nov 24 14:05:21 2010
New Revision: 120110

URL: http://llvm.org/viewvc/llvm-project?rev=120110&view=rev
Log:
Use ConvertType instead of ConvertTagDeclType, since ConvertType will assign a name to the type.

Modified:
    cfe/trunk/lib/CodeGen/CodeGenTypes.cpp

Modified: cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenTypes.cpp?rev=120110&r1=120109&r2=120110&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenTypes.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenTypes.cpp Wed Nov 24 14:05:21 2010
@@ -486,12 +486,14 @@
 /// getCGRecordLayout - Return record layout info for the given llvm::Type.
 const CGRecordLayout &
 CodeGenTypes::getCGRecordLayout(const RecordDecl *TD) {
-  const Type *Key = Context.getTagDeclType(TD).getTypePtr();
+  QualType T = Context.getTagDeclType(TD);
+  const Type *Key = T.getTypePtr();
 
   const CGRecordLayout *Layout = CGRecordLayouts.lookup(Key);
   if (!Layout) {
-    // Compute the type information.
-    ConvertTagDeclType(TD);
+    // Compute the type information. We use ConvertType here so that we'll
+    // get a name for the type.
+    ConvertType(T);
 
     // Now try again.
     Layout = CGRecordLayouts.lookup(Key);





More information about the cfe-commits mailing list