Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: include/llvm/Bitcode/NaCl/NaClBitcodeMungeUtils.h

Issue 1156103003: Initial implementation of a record-level bitcode fuzzer. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@fuzz
Patch Set: Fix issues in last patch. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/llvm/Bitcode/NaCl/NaClFuzz.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/llvm/Bitcode/NaCl/NaClBitcodeMungeUtils.h
diff --git a/include/llvm/Bitcode/NaCl/NaClBitcodeMungeUtils.h b/include/llvm/Bitcode/NaCl/NaClBitcodeMungeUtils.h
index c5cc31187be3765ea56081598cf9ccf83e8fb62b..6d3481a2df59fdbc9822eaef6a4858d389bf5793 100644
--- a/include/llvm/Bitcode/NaCl/NaClBitcodeMungeUtils.h
+++ b/include/llvm/Bitcode/NaCl/NaClBitcodeMungeUtils.h
@@ -238,7 +238,9 @@ public:
bool write(SmallVectorImpl<char> &Buffer, bool AddHeader,
const WriteFlags &Flags) const {
- return writeMaybeRepair(Buffer, AddHeader, Flags).NumErrors == 0;
+ WriteResults Results = writeMaybeRepair(Buffer, AddHeader, Flags);
+ return Results.NumErrors == 0
+ || (Flags.getTryToRecover() && Results.NumErrors == Results.NumRepairs);
}
bool write(SmallVectorImpl<char> &Buffer, bool AddHeader) const {
« no previous file with comments | « no previous file | include/llvm/Bitcode/NaCl/NaClFuzz.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698