clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

Each SymbolFile has its own type list that keeps the shared pointers to all 
types. So there should be no need for any of these changes here unless someone 
isn't correctly storing a newly created type in the SymbolFile's type list. You 
can see the types being stored in code like:

  TypeSP type_sp(... /* create type here*/ ...);
  dwarf->GetTypeList().Insert(type_sp); // Store the share reference in the 
symbol file's type list 



================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:208-209
 
   dwarf->GetTypeList().Insert(type_sp);
-  dwarf->GetDIEToType()[die.GetDIE()] = type_sp.get();
+  dwarf->GetDIEToType()[die.GetDIE()] = type_sp;
   clang::TagDecl *tag_decl = TypeSystemClang::GetAsTagDecl(type);
----------------
Above the "type_sp" is immediately stored in the SymbolFile's type list. So we 
don't need to do anything here and it _is_ safe to just store a "Type *".


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141318

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to