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

Anders Carlsson andersca at mac.com
Wed Nov 24 12:22:04 PST 2010


Author: andersca
Date: Wed Nov 24 14:22:04 2010
New Revision: 120112

URL: http://llvm.org/viewvc/llvm-project?rev=120112&view=rev
Log:
Revert r120110. We don't want to call ConvertType from within getCGRecordLayout.

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=120112&r1=120111&r2=120112&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenTypes.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenTypes.cpp Wed Nov 24 14:22:04 2010
@@ -483,17 +483,15 @@
   return ResultHolder.get();
 }
 
-/// getCGRecordLayout - Return record layout info for the given llvm::Type.
+/// getCGRecordLayout - Return record layout info for the given record decl.
 const CGRecordLayout &
-CodeGenTypes::getCGRecordLayout(const RecordDecl *TD) {
-  QualType T = Context.getTagDeclType(TD);
-  const Type *Key = T.getTypePtr();
+CodeGenTypes::getCGRecordLayout(const RecordDecl *RD) {
+  const Type *Key = Context.getTagDeclType(RD).getTypePtr();
 
   const CGRecordLayout *Layout = CGRecordLayouts.lookup(Key);
   if (!Layout) {
-    // Compute the type information. We use ConvertType here so that we'll
-    // get a name for the type.
-    ConvertType(T);
+    // Compute the type information.
+    ConvertTagDeclType(RD);
 
     // Now try again.
     Layout = CGRecordLayouts.lookup(Key);





More information about the cfe-commits mailing list