[llvm-commits] [dragonegg] r151972 - /dragonegg/trunk/src/Constants.cpp

Duncan Sands baldrick at free.fr
Sat Mar 3 00:56:30 PST 2012


Author: baldrick
Date: Sat Mar  3 02:56:30 2012
New Revision: 151972

URL: http://llvm.org/viewvc/llvm-project?rev=151972&view=rev
Log:
Remove this test.  It couldn't fire because it should have been
testing the type size, not the type (!).  But it wouldn't have
worked anyway because it doesn't correctly identify structs with
a variable length array at the end, and there doesn't seem to be
a good way to do that at this level.

Modified:
    dragonegg/trunk/src/Constants.cpp

Modified: dragonegg/trunk/src/Constants.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Constants.cpp?rev=151972&r1=151971&r2=151972&view=diff
==============================================================================
--- dragonegg/trunk/src/Constants.cpp (original)
+++ dragonegg/trunk/src/Constants.cpp Sat Mar  3 02:56:30 2012
@@ -1437,8 +1437,6 @@
     uint64_t TypeSize = getTargetData().getTypeAllocSizeInBits(Ty);
     if (InitSize < TypeSize)
       DieAbjectly("Constant too small for type!", exp);
-    if (isInt64(main_type(exp), true) && InitSize != TypeSize)
-      DieAbjectly("Constant too big for type!", exp);
   }
   if (getTargetData().getABITypeAlignment(Init->getType()) * 8 >
       TYPE_ALIGN(main_type(exp)))





More information about the llvm-commits mailing list