All the new code should match the behavior of the old exactly.
Of note, the custom queries used to be implemented inside HashedNameToDIE.cpp
(which is the LLDB implementation of the tables). However, when porting to LLVM,
we believe they don't belong inside the LLVM table implementation:
- They don't require any knowledge about the table itself
- They are not relevant for other users of these classes.
- They use LLDB data structures.
As such, we implement these custom queries inside AppleDWARFIndex.cpp.
Types and Objective-C tables are done separately, as they have slightly
different functionality that require rewriting more code.
I was a little confused by this comment. IIUC we cannot pass debug_str.getAsLLVM() to the AppleAcceleratorTable because it takes the DataExtractor by value and that would cause slicing. But why is that a problem though? A DWARFDataExtractor is a DataExtractor so wouldn't that be fine?
Alternatively, should we have another getAsLLVM() helper that returns a DataExtractor (and rename the current one to something like getAsLLVMDWARF).