llvm::raw_string_ostream OS(CoverageMapping);
CoverageMappingGen MappingGen(*CGM.getCoverageMapping(),
CGM.getContext().getSourceManager(),
- CGM.getLangOpts(), RegionCounterMap.get(),
- NumRegionCounters);
+ CGM.getLangOpts(), RegionCounterMap.get());
MappingGen.emitCounterMapping(D, OS);
OS.flush();
}
CounterCoverageMappingBuilder(
CoverageMappingModuleGen &CVM,
- llvm::DenseMap<const Stmt *, unsigned> &CounterMap,
- unsigned NumRegionCounters, SourceManager &SM,
+ llvm::DenseMap<const Stmt *, unsigned> &CounterMap, SourceManager &SM,
const LangOptions &LangOpts)
- : CoverageMappingBuilder(CVM, SM, LangOpts), CounterMap(CounterMap),
- Builder(NumRegionCounters) {}
+ : CoverageMappingBuilder(CVM, SM, LangOpts), CounterMap(CounterMap) {}
/// \brief Write the mapping data to the output stream
void write(llvm::raw_ostream &OS) {
void CoverageMappingGen::emitCounterMapping(const Decl *D,
llvm::raw_ostream &OS) {
assert(CounterMap);
- CounterCoverageMappingBuilder Walker(CVM, *CounterMap, NumRegionCounters, SM,
- LangOpts);
+ CounterCoverageMappingBuilder Walker(CVM, *CounterMap, SM, LangOpts);
Walker.VisitDecl(D);
Walker.write(OS);
}
SourceManager &SM;
const LangOptions &LangOpts;
llvm::DenseMap<const Stmt *, unsigned> *CounterMap;
- unsigned NumRegionCounters;
public:
CoverageMappingGen(CoverageMappingModuleGen &CVM, SourceManager &SM,
const LangOptions &LangOpts)
- : CVM(CVM), SM(SM), LangOpts(LangOpts), CounterMap(nullptr),
- NumRegionCounters(0) {}
+ : CVM(CVM), SM(SM), LangOpts(LangOpts), CounterMap(nullptr) {}
CoverageMappingGen(CoverageMappingModuleGen &CVM, SourceManager &SM,
const LangOptions &LangOpts,
- llvm::DenseMap<const Stmt *, unsigned> *CounterMap,
- unsigned NumRegionCounters)
- : CVM(CVM), SM(SM), LangOpts(LangOpts), CounterMap(CounterMap),
- NumRegionCounters(NumRegionCounters) {}
+ llvm::DenseMap<const Stmt *, unsigned> *CounterMap)
+ : CVM(CVM), SM(SM), LangOpts(LangOpts), CounterMap(CounterMap) {}
/// \brief Emit the coverage mapping data which maps the regions of
/// code to counters that will be used to find the execution