Reasons are the same as: D74637
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
The thing I said on the other patch about DIERef vs user_id_t still applies. Let's continue the discussion there...
lldb/source/Plugins/SymbolFile/DWARF/DIERef.h | ||
---|---|---|
37 | I'd very much like to avoid a default-constructed DIERef -- in the previous refactoring, I've deleted that concept and tried to use Optional<DIERef> in contexts, where the object can be empty. |
Per discussion on the other patch, I think this is fine too, just can we get rid of the DIERef default constructor? I think all you'd need is to use the insert DenseMap function instead of operator[].
Sorry for that DenseMap::insert, I see it is the same as std::map, I should study DenseMap more.
Yep, it tried to be similar to std::map, but there are some (sometimes subtle) differences.
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp | ||
---|---|---|
1726 | Actually, try_emplace would be slightly better here. (Sorry for the back-and-forth :/). |
I'd very much like to avoid a default-constructed DIERef -- in the previous refactoring, I've deleted that concept and tried to use Optional<DIERef> in contexts, where the object can be empty.