Skip to content

[llvm-debuginfo-analyzer] Optimize 'LVNamespaceDeduction::find' funtion. #69174

Open
@CarlosAlbertoEnciso

Description

@CarlosAlbertoEnciso

Extracted from llvm/tools/llvm-debuginfo-analyzer/README.txt
https://reviews.llvm.org/D125784#inline-1296195

Optimize the 'find' method to use the proposed code:

  LVStringRefs::iterator Iter = std::find_if(Components.begin(), Components.end(),
    [](StringRef Name) {
        return IdentifiedNamespaces.find(Name) == IdentifiedNamespaces.end();
    });
  LVStringRefs::size_type FirstNonNamespace = std::distance(Components.begin(), Iter);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions