summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2010-01-12 00:28:59 +0000
committerMike Stump <mrs@apple.com>2010-01-12 00:28:59 +0000
commit66d29ec664e3fabcaa65cb7f459897508bc59872 (patch)
tree3bc391a5c8b875e82f14f652519655d036bd234e /utils
parent317238334161d2c72d2432a79827d9a7ee1fc123 (diff)
downloadclang-66d29ec664e3fabcaa65cb7f459897508bc59872.tar.gz
Allow N_FIELDS to be 0.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93211 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/VtableTest/gen.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/VtableTest/gen.cc b/utils/VtableTest/gen.cc
index 0f586e5918..5bcfff06ba 100644
--- a/utils/VtableTest/gen.cc
+++ b/utils/VtableTest/gen.cc
@@ -110,7 +110,7 @@ void gs(int s) {
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;