[llvm-commits] [dragonegg] r120738 - /dragonegg/trunk/llvm-types.cpp

Duncan Sands baldrick at free.fr
Thu Dec 2 13:02:10 PST 2010


Author: baldrick
Date: Thu Dec  2 15:02:10 2010
New Revision: 120738

URL: http://llvm.org/viewvc/llvm-project?rev=120738&view=rev
Log:
Do not try to give the void type a name (otherwise LLVM IR is produced
that fails to parse).  Bug introduced by the recent refactorization of
the type naming code.

Modified:
    dragonegg/trunk/llvm-types.cpp

Modified: dragonegg/trunk/llvm-types.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-types.cpp?rev=120738&r1=120737&r2=120738&view=diff
==============================================================================
--- dragonegg/trunk/llvm-types.cpp (original)
+++ dragonegg/trunk/llvm-types.cpp Thu Dec  2 15:02:10 2010
@@ -870,7 +870,7 @@
   // Try to give the type a helpful name.  There is no point in doing this for
   // array and pointer types since LLVM automatically gives them a useful name
   // based on the element type.
-  if (!isa<SequentialType>(Ty)) {
+  if (!Ty->isVoidTy() && !isa<SequentialType>(Ty)) {
     const std::string &TypeName = getDescriptiveName(type);
     if (!TypeName.empty())
       TheModule->addTypeName(TypeName, Ty);





More information about the llvm-commits mailing list