diff --git a/pybind/SVFIR.cpp b/pybind/SVFIR.cpp index f936a3f..6ef2b46 100644 --- a/pybind/SVFIR.cpp +++ b/pybind/SVFIR.cpp @@ -717,6 +717,7 @@ void bind_svf_var(py::module &m) { .def("getReturnType", &SVF::FunObjVar::getReturnType, py::return_value_policy::reference) .def("arg_size", &SVF::FunObjVar::arg_size) .def("getArg", &SVF::FunObjVar::getArg, py::arg("index"), py::return_value_policy::reference) + .def("getSourceLoc", &SVF::FunObjVar::getSourceLoc, py::return_value_policy::reference) .def("dominates", [](SVF::FunObjVar* node, SVF::SVFBasicBlock* bbKey, SVF::SVFBasicBlock* bbValue) -> bool { return node->dominate(bbKey, bbValue); diff --git a/pysvf/pysvf.pyi b/pysvf/pysvf.pyi index 8ae541a..a1447ad 100644 --- a/pysvf/pysvf.pyi +++ b/pysvf/pysvf.pyi @@ -1093,9 +1093,12 @@ class FunObjVar(BaseObjVar): def toString(self) -> str: ... """Get the string representation of the SVF variable""" + def getSourceLoc(self) -> str: ... + """Get the source location of the function definition""" + def dominates(self, bbKey: SVFBasicBlock, bbValue: SVFBasicBlock) -> bool: ... """Check if one basic block dominates another""" - + def postDominate(self, bbKey: SVFBasicBlock, bbValue: SVFBasicBlock) -> bool: ... """Check if one basic block post-dominates another"""