[all-commits] [llvm/llvm-project] c327f9: [lldb] Refactor deduction of the instance variable...

Dave Lee via All-commits all-commits at lists.llvm.org
Tue Mar 21 15:22:21 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c327f9925428870e6288fa65bb709dcc3c0a0f31
      https://github.com/llvm/llvm-project/commit/c327f9925428870e6288fa65bb709dcc3c0a0f31
  Author: Dave Lee <davelee.com at gmail.com>
  Date:   2023-03-21 (Tue, 21 Mar 2023)

  Changed paths:
    M lldb/include/lldb/Symbol/CompilerDeclContext.h
    M lldb/include/lldb/Symbol/TypeSystem.h
    M lldb/include/lldb/Target/Language.h
    M lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
    M lldb/source/Plugins/Language/ObjC/ObjCLanguage.h
    M lldb/source/Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h
    M lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
    M lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
    M lldb/source/Symbol/CompilerDeclContext.cpp
    M lldb/source/Symbol/SymbolContext.cpp

  Log Message:
  -----------
  [lldb] Refactor deduction of the instance variable's name (NFC)

Move responsibility of providing the instance variable name (`this`, `self`) from
`TypeSystem` to `Language`.

`Language` the natural place for this, but also has downstream benefits. Some languages
have multiple `TypeSystem` implementations (ex Swift), and by placing this logic in the
`Language`, redundancy is avoided.

This change relies on the tests from D145348 and D146320.

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




More information about the All-commits mailing list