mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
InstrProf: Optionally generate coverage maps when profiling
This adds the -profile-coverage-mapping option to swift, and teaches SILGenProfiling to generate mappings from source ranges to counters. Swift SVN r25266
This commit is contained in:
@@ -412,7 +412,8 @@ bool SILGenModule::hasFunction(SILDeclRef constant) {
|
||||
void SILGenModule::visitFuncDecl(FuncDecl *fd) {
|
||||
const auto &Opts = M.getOptions();
|
||||
if (Opts.GenerateProfile)
|
||||
Profiler = llvm::make_unique<SILGenProfiling>(*this);
|
||||
Profiler = llvm::make_unique<SILGenProfiling>(
|
||||
*this, Opts.EmitProfileCoverageMapping);
|
||||
emitFunction(fd);
|
||||
Profiler = nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user