[llvm-commits] [dragonegg] r136061 - /dragonegg/trunk/src/Types.cpp

Duncan Sands baldrick at free.fr
Tue Jul 26 00:02:11 PDT 2011


Author: baldrick
Date: Tue Jul 26 02:02:11 2011
New Revision: 136061

URL: http://llvm.org/viewvc/llvm-project?rev=136061&view=rev
Log:
Nasty hack to try to ressurect the dragonegg builders.  This is fallout
from the new LLVM type system.

Modified:
    dragonegg/trunk/src/Types.cpp

Modified: dragonegg/trunk/src/Types.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Types.cpp?rev=136061&r1=136060&r2=136061&view=diff
==============================================================================
--- dragonegg/trunk/src/Types.cpp (original)
+++ dragonegg/trunk/src/Types.cpp Tue Jul 26 02:02:11 2011
@@ -408,12 +408,16 @@
     if (RecursionStatus == CS_Struct)
       RecursionStatus = CS_StructPtr;
 
-    Ty = ConvertType(TREE_TYPE(type));
+    if (RecursionStatus != CS_StructPtr)
+      Ty = ConvertType(TREE_TYPE(type));
+    else
+      // FIXME: Hack to avoid crashes with the new LLVM type system.
+      Ty = GetUnitType(Context);
 
     RecursionStatus = SavedCS;
 
     if (Ty->isVoidTy())
-      Ty = Type::getInt8Ty(Context);  // void* -> i8*
+      Ty = GetUnitType(Context);  // void* -> byte*
     return SET_TYPE_LLVM(type, Ty->getPointerTo());
   }
 





More information about the llvm-commits mailing list