Skip to content

Commit 5abebd6

Browse files
martinmartin-cs
authored andcommitted
Add a domain factory that passes the location of the domain
1 parent 1073cac commit 5abebd6

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/analyses/ai_domain.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,4 +235,21 @@ class ai_domain_factory_default_constructort
235235
}
236236
};
237237

238+
template <typename domainT>
239+
class ai_domain_factory_location_constructort
240+
: public ai_domain_factoryt<domainT>
241+
{
242+
public:
243+
typedef ai_domain_factory_baset::statet statet;
244+
typedef ai_domain_factory_baset::locationt locationt;
245+
typedef ai_domain_factory_baset::trace_ptrt trace_ptrt;
246+
247+
std::unique_ptr<statet> make(locationt l) const override
248+
{
249+
auto d = util_make_unique<domainT>(l);
250+
CHECK_RETURN(d->is_bottom());
251+
return std::unique_ptr<statet>(d.release());
252+
}
253+
};
254+
238255
#endif

0 commit comments

Comments
 (0)