| 23 | } |
| 24 | |
| 25 | void ProtobufMutator::addInput(FuzzInput &Input) { |
| 26 | FuzzVarDecls.emplace_back(genFuzzVarDecl(Input)); |
| 27 | FuzzVarAssigns.emplace_back(genFuzzVarAssign(Input)); |
| 28 | if (!Input.getDef().ArrayLen) { |
| 29 | assert(Input.getFTGType().getRealType() && "Unexpected Program State"); |
| 30 | if (!Descriptor.addField(*Input.getFTGType().getRealType(), |
| 31 | Input.getProtoVarName())) |
| 32 | assert(false && "Unexpected Program State"); |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | void ProtobufMutator::genEntry(const std::string &OutDir, |
| 37 | const std::string &FileName, |