mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-16 17:31:51 +03:00
mcclellan, gough: native report remapping
This commit is contained in:
committed by
Matthew Barr
parent
611579511c
commit
1f41a921f2
@@ -395,27 +395,4 @@ dstate_id_t get_sds_or_proxy(const raw_dfa &raw) {
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
void remapReportsToPrograms(flat_set<ReportID> &reports,
|
||||
const ReportManager &rm) {
|
||||
if (reports.empty()) {
|
||||
return;
|
||||
}
|
||||
auto old_reports = reports;
|
||||
reports.clear();
|
||||
for (const ReportID &id : old_reports) {
|
||||
u32 program = rm.getProgramOffset(id);
|
||||
reports.insert(program);
|
||||
}
|
||||
}
|
||||
|
||||
void remapReportsToPrograms(raw_dfa &rdfa, const ReportManager &rm) {
|
||||
DEBUG_PRINTF("remap dfa reports\n");
|
||||
for (auto &ds : rdfa.states) {
|
||||
remapReportsToPrograms(ds.reports, rm);
|
||||
remapReportsToPrograms(ds.reports_eod, rm);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace ue2
|
||||
|
||||
Reference in New Issue
Block a user