[lldb][NFC] Remove misleading class_language variable in DWARFASTParserClang
authorRaphael Isemann <teemperor@gmail.com>
Mon, 13 Jul 2020 10:22:09 +0000 (12:22 +0200)
committerRaphael Isemann <teemperor@gmail.com>
Mon, 13 Jul 2020 11:10:12 +0000 (13:10 +0200)
commit60cbbb306d29f882e18d6293177d694c11c67e84
treeedbbebdd823dd5baa55c0e1234d1d19e89bc8c82
parentc051312eb24dedc119a917ea23e6a5810f5758ff
[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.
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h