alexshap added a comment.

@tberghammer, SymbolFileDWARF (the base class of SymbolFileDWARFDwo) calls 
Index()
"lazily" in may places, so indexing of dwo happens almost inevitably (at the 
moment) 
(FindCompleteObjCDefinitionTypeForDIE  is just one example).

> because this way you will index the compile unit twice (once from the main 
> object file and once from the dwo), 
> then create 2 CompilerType for the 2 indexed version and will start hitting 
> random issues in 
> expression evaluation when clang will get confused by 2 declaration for the 
> same type.

there are two separate CompileUnits here, not one,
There is a compile unit represented by m_base_dwarf_cu (roughly speaking for 
.o) and and there is another one
(which we can get, for example, via SymbolFileDWARFDwo::GetCompileUnit()) 
(roughly speaking for dwo).
(please, correct me if i'm wrong). For the latter GetOffset() would typically 
return 0, 
for the former GetOffset() typically returns the higher 32 bits of Id.


Repository:
  rL LLVM

https://reviews.llvm.org/D39825



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

Reply via email to