We have a lot of code in our lookup code to pass around current_id counters which end up in our logs like this:
AOCTV::FT [234] Found XYZ
This patch removes all of this code because:
- I'm splitting up all humongous functions, so I need to write more and more boilerplate to pass around these ids.
- I never saw any similar counters in the LLDB/LLVM code base.
- They're essentially globals and the last thing we need in LLDB is even more global state.
- They're not really useful when readings logs. It doesn't help that there isn't just 1 or 2 counters, but 12 (!) unique counters. I always thought that if I see two identical counter values in those brackets it's the same lookup request, but it seems that's only true by accident (and you can't know which of the 12 counters is actually printed without reading the code). The only time I know I can trust the counters is when it's obvious from the log that it's the same counter like in the log below, but then why have the counters in the first place?
LayoutRecordType[28] on (ASTContext*)0x00007FFA1C840200 'scratch ASTContext' for (RecordDecl*)0x00007FFA0AAE8CF0 [name = '__tree'] LRT[28] returned: LRT[28] Original = (RecordDecl*)%p LRT[28] Size = %lld LRT[28] Alignment = %lld LRT[28] Fields: LRT[28] (FieldDecl*)0x00007FFA1A13B1D0, Name = '__begin_node_', Offset = 0 bits LRT[28] (FieldDecl*)0x00007FFA1C08FD30, Name = '__pair1_', Offset = 64 bits LRT[28] (FieldDecl*)0x00007FFA1C061210, Name = '__pair3_', Offset = 128 bits LRT[28] Bases: