Adding validation code for OpSwitch limits
authorEhsan Nasiri <ehsann@google.com>
Fri, 25 Nov 2016 14:26:26 +0000 (09:26 -0500)
committerDavid Neto <dneto@google.com>
Wed, 30 Nov 2016 20:36:05 +0000 (15:36 -0500)
commit3c8bc80e3ab4d22ba320e3760e10aef251603311
tree7beb4bd9ca3fa7d7426945c9bf77859e056b57e2
parentbef80716d70a0b71b07f1ff99da5711624620b2d
Adding validation code for OpSwitch limits

The number of (literal, label) pairs passed to OpSwitch may not exceed
16,383. Added code to validate this and added unit tests for it.

Also fixed a typo in another validor error message.
source/validate_cfg.cpp
source/validate_instruction.cpp
test/val/val_cfg_test.cpp
test/val/val_limits_test.cpp