[Lldb-commits] [lldb] [lldb] Merge CompilerContextKind::{Class, Struct} (PR #96145)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 20 01:05:26 PDT 2024


================
@@ -75,20 +75,18 @@ bool lldb_private::contextMatches(llvm::ArrayRef<CompilerContext> context_chain,
 static CompilerContextKind ConvertTypeClass(lldb::TypeClass type_class) {
   if (type_class == eTypeClassAny)
     return CompilerContextKind::AnyType;
-  uint16_t result = 0;
-  if (type_class & lldb::eTypeClassClass)
-    result |= (uint16_t)CompilerContextKind::Class;
-  if (type_class & lldb::eTypeClassStruct)
-    result |= (uint16_t)CompilerContextKind::Struct;
----------------
labath wrote:

This is a potentially controversial change. It means that if someone does a `image lookup -t 'struct Foo'`, we will also return a `class Foo`. This could be viewed as confusing, or as consistent with how we handle structures/classes elsewhere...

https://github.com/llvm/llvm-project/pull/96145


More information about the lldb-commits mailing list