This revision was automatically updated to reflect the committed changes.
Closed by commit rG8e9fb845fcc4: [lldb] Also set owning module for template 
specializations (authored by teemperor).
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79168/new/

https://reviews.llvm.org/D79168

Files:
  lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
  lldb/test/Shell/SymbolFile/DWARF/module-ownership.mm


Index: lldb/test/Shell/SymbolFile/DWARF/module-ownership.mm
===================================================================
--- lldb/test/Shell/SymbolFile/DWARF/module-ownership.mm
+++ lldb/test/Shell/SymbolFile/DWARF/module-ownership.mm
@@ -52,10 +52,10 @@
 
 // Template specializations are not yet supported, so they lack the ownership 
info:
 Template<int> t2;
-// CHECK-DAG: ClassTemplateSpecializationDecl {{.*}} struct Template
+// CHECK-DAG: ClassTemplateSpecializationDecl {{.*}} imported in A struct 
Template
 
 Namespace::InNamespace<int> t3;
-// CHECK-DAG: ClassTemplateSpecializationDecl {{.*}} struct InNamespace
+// CHECK-DAG: ClassTemplateSpecializationDecl {{.*}} imported in A struct 
InNamespace
 
 Namespace::AlsoInNamespace<int> t4;
-// CHECK-DAG: ClassTemplateSpecializationDecl {{.*}} struct AlsoInNamespace
+// CHECK-DAG: ClassTemplateSpecializationDecl {{.*}} imported in A.B struct 
AlsoInNamespace
Index: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
===================================================================
--- lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -1563,15 +1563,7 @@
   ast.getTypeDeclType(class_template_specialization_decl, nullptr);
   class_template_specialization_decl->setDeclName(
       class_template_decl->getDeclName());
-  // FIXME: Turning this on breaks the libcxx data formatter tests.
-  // SetOwningModule marks the Decl as external, which prevents a
-  // LookupPtr from being built. Template instantiations can also not
-  // be found by ExternalASTSource::FindExternalVisibleDeclsByName(),
-  // nor can we lazily build a LookupPtr later, because template
-  // specializations are supposed to be hidden so
-  // makeDeclVisibleInContextWithFlags() is a noop, as well.
-  //
-  // SetOwningModule(class_template_specialization_decl, owning_module);
+  SetOwningModule(class_template_specialization_decl, owning_module);
   decl_ctx->addDecl(class_template_specialization_decl);
 
   class_template_specialization_decl->setSpecializationKind(


Index: lldb/test/Shell/SymbolFile/DWARF/module-ownership.mm
===================================================================
--- lldb/test/Shell/SymbolFile/DWARF/module-ownership.mm
+++ lldb/test/Shell/SymbolFile/DWARF/module-ownership.mm
@@ -52,10 +52,10 @@
 
 // Template specializations are not yet supported, so they lack the ownership info:
 Template<int> t2;
-// CHECK-DAG: ClassTemplateSpecializationDecl {{.*}} struct Template
+// CHECK-DAG: ClassTemplateSpecializationDecl {{.*}} imported in A struct Template
 
 Namespace::InNamespace<int> t3;
-// CHECK-DAG: ClassTemplateSpecializationDecl {{.*}} struct InNamespace
+// CHECK-DAG: ClassTemplateSpecializationDecl {{.*}} imported in A struct InNamespace
 
 Namespace::AlsoInNamespace<int> t4;
-// CHECK-DAG: ClassTemplateSpecializationDecl {{.*}} struct AlsoInNamespace
+// CHECK-DAG: ClassTemplateSpecializationDecl {{.*}} imported in A.B struct AlsoInNamespace
Index: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
===================================================================
--- lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -1563,15 +1563,7 @@
   ast.getTypeDeclType(class_template_specialization_decl, nullptr);
   class_template_specialization_decl->setDeclName(
       class_template_decl->getDeclName());
-  // FIXME: Turning this on breaks the libcxx data formatter tests.
-  // SetOwningModule marks the Decl as external, which prevents a
-  // LookupPtr from being built. Template instantiations can also not
-  // be found by ExternalASTSource::FindExternalVisibleDeclsByName(),
-  // nor can we lazily build a LookupPtr later, because template
-  // specializations are supposed to be hidden so
-  // makeDeclVisibleInContextWithFlags() is a noop, as well.
-  //
-  // SetOwningModule(class_template_specialization_decl, owning_module);
+  SetOwningModule(class_template_specialization_decl, owning_module);
   decl_ctx->addDecl(class_template_specialization_decl);
 
   class_template_specialization_decl->setSpecializationKind(
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to