Instead of iterating over our vector of functions, we might as well use a map here to
directly get the function we need.
Thanks to Vedant for pointing this out.
Differential D50225
Use a DenseMap for looking up functions by UID in CompileUnit::FindFunctionByUID teemperor on Aug 2 2018, 10:47 PM. Authored by
Details
Instead of iterating over our vector of functions, we might as well use a map here to Thanks to Vedant for pointing this out.
Diff Detail Event TimelineComment Actions Thanks for doing this :)!
Comment Actions
|
Is m_functions used to do anything crucial?
I see a use in Dump, but it seems like you could replace that use by copying the function map into a vector and sorting it. I see another use in GetFunctionAtIndex, but that API can be deleted entirely because its only user is lldb-test (via Module::ParseAllDebugSymbols). You'd just need to sink this block of code into CompileUnit: