diff options
| author | Igor Laevsky <igmyrj@gmail.com> | 2018-02-05 11:05:47 +0000 |
|---|---|---|
| committer | Igor Laevsky <igmyrj@gmail.com> | 2018-02-05 11:05:47 +0000 |
| commit | 14c979da329daf35ebc99a0bd11581b0b081d813 (patch) | |
| tree | 4a3c50fbcfd39f0be4401291f983596053ca6b71 /llvm/include | |
| parent | 401df580641bd6be73d37a0dbb65e7348263fd8a (diff) | |
| download | bcm5719-llvm-14c979da329daf35ebc99a0bd11581b0b081d813.tar.gz bcm5719-llvm-14c979da329daf35ebc99a0bd11581b0b081d813.zip | |
[llvm-opt-fuzzer] Avoid adding incorrect inputs to the fuzzer corpus
Differential Revision: https://reviews.llvm.org/D42414
llvm-svn: 324225
Diffstat (limited to 'llvm/include')
| -rw-r--r-- | llvm/include/llvm/FuzzMutate/FuzzerCLI.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/include/llvm/FuzzMutate/FuzzerCLI.h b/llvm/include/llvm/FuzzMutate/FuzzerCLI.h index a775fdfb603..3333e96db16 100644 --- a/llvm/include/llvm/FuzzMutate/FuzzerCLI.h +++ b/llvm/include/llvm/FuzzMutate/FuzzerCLI.h @@ -68,6 +68,12 @@ std::unique_ptr<Module> parseModule(const uint8_t *Data, size_t Size, /// returns 0 and leaves Dest unchanged. size_t writeModule(const Module &M, uint8_t *Dest, size_t MaxSize); +/// Try to parse module and verify it. May output verification errors to the +/// errs(). +/// \return New module or nullptr in case of error. +std::unique_ptr<Module> parseAndVerify(const uint8_t *Data, size_t Size, + LLVMContext &Context); + } // end llvm namespace #endif // LLVM_FUZZMUTATE_FUZZER_CLI_H |

