mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
support for record extensions when using -O gen-standalone-C++
This commit is contained in:
parent
300b3788e2
commit
960931ba5c
7 changed files with 64 additions and 9 deletions
|
@ -125,13 +125,13 @@ bool should_analyze(const ScriptFuncPtr& f, const StmtPtr& body) {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool obj_matches_opt_files(const Obj* obj) {
|
||||
bool filename_matches_opt_files(const char* filename) {
|
||||
auto& ofiles = analysis_options.only_files;
|
||||
|
||||
if ( ofiles.empty() )
|
||||
return false;
|
||||
|
||||
auto fin = util::detail::normalize_path(obj->GetLocationInfo()->filename);
|
||||
auto fin = util::detail::normalize_path(filename);
|
||||
|
||||
for ( auto& o : ofiles )
|
||||
if ( std::regex_match(fin, o) )
|
||||
|
@ -140,6 +140,8 @@ bool obj_matches_opt_files(const Obj* obj) {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool obj_matches_opt_files(const Obj* obj) { return filename_matches_opt_files(obj->GetLocationInfo()->filename); }
|
||||
|
||||
static bool optimize_AST(ScriptFuncPtr f, std::shared_ptr<ProfileFunc>& pf, std::shared_ptr<Reducer>& rc,
|
||||
ScopePtr scope, StmtPtr& body) {
|
||||
pf = std::make_shared<ProfileFunc>(f.get(), body, true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue