Update coverage options for fuzzing to match clang (#26156)

This commit is contained in:
pschuh
2019-07-17 12:25:40 -07:00
committed by George Karpenkov
parent eb9b24104e
commit c54b30ab71
2 changed files with 8 additions and 3 deletions

View File

@@ -1130,9 +1130,14 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
// Automatically set coverage flags, unless coverage type was explicitly
// requested.
// Updated to match clang at Jul 2019.
Opts.SanitizeCoverage.IndirectCalls = true;
Opts.SanitizeCoverage.TraceCmp = true;
Opts.SanitizeCoverage.TracePCGuard = true;
Opts.SanitizeCoverage.PCTable = true;
if (Triple.isOSLinux()) {
Opts.SanitizeCoverage.StackDepth = true;
}
Opts.SanitizeCoverage.Inline8bitCounters = true;
Opts.SanitizeCoverage.CoverageType = llvm::SanitizerCoverageOptions::SCK_Edge;
}