[all-commits] [llvm/llvm-project] 0e45e6: Use ForEachExternalModule in ParseTypeFromClangMod...

adrian-prantl via All-commits all-commits at lists.llvm.org
Thu Nov 14 08:58:37 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0e45e60c6f316d095d878aea3c098202b39b5bee
      https://github.com/llvm/llvm-project/commit/0e45e60c6f316d095d878aea3c098202b39b5bee
  Author: Adrian Prantl <aprantl at apple.com>
  Date:   2019-11-14 (Thu, 14 Nov 2019)

  Changed paths:
    M lldb/include/lldb/Symbol/CompileUnit.h
    M lldb/include/lldb/Symbol/SymbolFile.h
    M lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
    M lldb/source/Symbol/CompileUnit.cpp

  Log Message:
  -----------
  Use ForEachExternalModule in ParseTypeFromClangModule (NFC)

I wanted to further simplify ParseTypeFromClangModule by replacing the
hand-rolled loop with ForEachExternalModule, and then realized that
ForEachExternalModule also had the problem of visiting the same leaf
node an exponential number of times in the worst-case. This adds a set
of searched_symbol_files set to the function as well as the ability to
early-exit from it.

Differential Revision: https://reviews.llvm.org/D70215




More information about the All-commits mailing list