================
@@ -1700,8 +1700,10 @@ void 
DWARFASTParserClang::GetUniqueTypeNameAndDeclaration(
   // For C++, we rely solely upon the one definition rule that says
   // only one thing can exist at a given decl context. We ignore the
   // file and line that things are declared on.
-  if (!die.IsValid() || !Language::LanguageIsCPlusPlus(language) ||
-      unique_typename.IsEmpty())
+  // FIXME: Rust pretends to be C++ for now, so use C++ name qualification 
rules
+  auto isCPlusPlusOrSimilar = Language::LanguageIsCPlusPlus(language) ||
+                              language == lldb::eLanguageTypeRust;
+  if (!die.IsValid() || !isCPlusPlusOrSimilar || unique_typename.IsEmpty())
----------------
Michael137 wrote:

I would just do:
```suggestion
 if (!Language::LanguageIsCPlusPlus(language) && !language == 
lldb::eLanguageTypeRust)
   return;

  if (!die.IsValid() || unique_typename.IsEmpty())
    return;
```

https://github.com/llvm/llvm-project/pull/165840
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to