[cfe-commits] r93211 - /cfe/trunk/utils/VtableTest/gen.cc
Mike Stump
mrs at apple.com
Mon Jan 11 16:28:59 PST 2010
Author: mrs
Date: Mon Jan 11 18:28:59 2010
New Revision: 93211
URL: http://llvm.org/viewvc/llvm-project?rev=93211&view=rev
Log:
Allow N_FIELDS to be 0.
Modified:
cfe/trunk/utils/VtableTest/gen.cc
Modified: cfe/trunk/utils/VtableTest/gen.cc
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/VtableTest/gen.cc?rev=93211&r1=93210&r2=93211&view=diff
==============================================================================
--- cfe/trunk/utils/VtableTest/gen.cc (original)
+++ cfe/trunk/utils/VtableTest/gen.cc Mon Jan 11 18:28:59 2010
@@ -110,7 +110,7 @@
gl(" {");
/* Fields */
- int n_fields = random() % (N_FIELDS*4);
+ int n_fields = N_FIELDS == 0 ? 0 : random() % (N_FIELDS*4);
// PARAM: 3/4 of all structs should have no members
if (n_fields >= N_FIELDS)
n_fields = 0;
More information about the cfe-commits
mailing list