[all-commits] [llvm/llvm-project] cfaa5c: [lldb] Filter duplicates in Target::GetScratchType...

Raphael Isemann via All-commits all-commits at lists.llvm.org
Tue Oct 19 02:50:16 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cfaa5c344d5bc73aae0ec39d57d98acf7463fccf
      https://github.com/llvm/llvm-project/commit/cfaa5c344d5bc73aae0ec39d57d98acf7463fccf
  Author: Raphael Isemann <teemperor at gmail.com>
  Date:   2021-10-19 (Tue, 19 Oct 2021)

  Changed paths:
    M lldb/source/Target/Target.cpp
    A lldb/test/API/lang/c/builtin-types/TestCBuiltinTypes.py

  Log Message:
  -----------
  [lldb] Filter duplicates in Target::GetScratchTypeSystems

`Target::GetScratchTypeSystems` returns the list of scratch TypeSystems. The
current implementation is iterating over all LanguageType values and retrieves
the respective TypeSystem for each LanguageType.

All C/C++/Obj-C LanguageTypes are however mapped to the same
ScratchTypeSystemClang instance, so the current implementation adds this single
TypeSystem instance several times to the list of TypeSystems (once for every
LanguageType that we support).

The only observable effect of this is that `SBTarget.FindTypes` for builtin
types currently queries the ScratchTypeSystemClang several times (and also adds
the same result several times).

Reviewed By: bulbazord, labath

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




More information about the All-commits mailing list