[llvm-branch-commits] [cfe-branch] r134796 - /cfe/branches/type-system-rewrite/lib/CodeGen/CodeGenTypes.cpp

Chris Lattner sabre at nondot.org
Fri Jul 8 22:50:36 PDT 2011


Author: lattner
Date: Sat Jul  9 00:50:36 2011
New Revision: 134796

URL: http://llvm.org/viewvc/llvm-project?rev=134796&view=rev
Log:
lower enums to {} when they are forward declarations instead of void.  This allows
us to make pointers to them.

Modified:
    cfe/branches/type-system-rewrite/lib/CodeGen/CodeGenTypes.cpp

Modified: cfe/branches/type-system-rewrite/lib/CodeGen/CodeGenTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/type-system-rewrite/lib/CodeGen/CodeGenTypes.cpp?rev=134796&r1=134795&r2=134796&view=diff
==============================================================================
--- cfe/branches/type-system-rewrite/lib/CodeGen/CodeGenTypes.cpp (original)
+++ cfe/branches/type-system-rewrite/lib/CodeGen/CodeGenTypes.cpp Sat Jul  9 00:50:36 2011
@@ -354,8 +354,8 @@
     const EnumDecl *ED = cast<EnumType>(Ty)->getDecl();
     if (ED->isDefinition() || ED->isFixed())
       return ConvertType(ED->getIntegerType());
-    // Return a placeholder type.
-    ResultType = llvm::Type::getVoidTy(getLLVMContext());
+    // Return a placeholder '{}' type.
+    ResultType = llvm::StructType::get(getLLVMContext());
     break;
   }
 





More information about the llvm-branch-commits mailing list