diff options
Diffstat (limited to 'function.cpp')
| -rw-r--r-- | function.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/function.cpp b/function.cpp index 96795ef0..12c9d241 100644 --- a/function.cpp +++ b/function.cpp @@ -1446,6 +1446,24 @@ set<SSAVariable> Function::GetHighLevelILSSAVariablesIfAvailable() } +std::vector<Ref<Component>> Function::GetParentComponents() const +{ + std::vector<Ref<Component>> components; + + size_t count; + BNComponent** list = BNGetFunctionParentComponents(m_object, &count); + + components.reserve(count); + for (size_t i = 0; i < count; i++) + { + Ref<Component> component = new Component(list[i]); + components.push_back(component); + } + + return components; +} + + void Function::CreateAutoVariable( const Variable& var, const Confidence<Ref<Type>>& type, const string& name, bool ignoreDisjointUses) { |
