[all-commits] [llvm/llvm-project] 60cbbb: [lldb][NFC] Remove misleading class_language varia...

Raphael Isemann via All-commits all-commits at lists.llvm.org
Mon Jul 13 04:10:47 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 60cbbb306d29f882e18d6293177d694c11c67e84
      https://github.com/llvm/llvm-project/commit/60cbbb306d29f882e18d6293177d694c11c67e84
  Author: Raphael Isemann <teemperor at gmail.com>
  Date:   2020-07-13 (Mon, 13 Jul 2020)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h

  Log Message:
  -----------
  [lldb][NFC] Remove misleading class_language variable in DWARFASTParserClang

There is a local 'class_language' veriable in DWARFASTParserClang which is named
as if it is related to the 'class_language' member of ParsedDWARFTypeAttributes.
However, it actually only has two possible enum values: 'ObjC' (which means the
current record is a Objective-C class) or 'Unknown' (which covers all other
cases).

This is confusing for the reader and also lead to some strange code where we
have several comparisons against the value "ObjC_plus_plus" (which is always
false).

This replaces the variable with either a const bool variable (if there are
multiple checks for that condition in a function) or a direct call to the
TypeSystemClang utility method for checking if it's a Objective-C
Object/Interface type.




More information about the All-commits mailing list