This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Delete IRExecutionUnit::SearchSpec
ClosedPublic

Authored by bulbazord on Sep 7 2021, 12:28 PM.

Details

Summary

IRExecutionUnit::SearchSpec is a struct that encapsulates information
needed to look for a symbol. Specifically, it is comprised of a name
represented with a ConstString and a FunctionNameType mask.
Because the mask is unused (effectively always set to
eFunctionNameTypeFull), we can remove the mask and replace all uses with
eFunctionNameTypeFull. After doing that, SearchSpec is effectively a
wrapper around a ConstString.

As an aside, SearchSpec is similar in purpose to Module::LookupInfo. I
briefly considered replacing uses of SearchSpec with LookupInfo, but
the current code only cares about symbol names (treating them as
eFunctionNameTypeFull). This code does care about language type, so
LookupInfo may be appropriate for IRExecutionUnit in the future.

Diff Detail

Event Timeline

bulbazord requested review of this revision.Sep 7 2021, 12:28 PM
bulbazord created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptSep 7 2021, 12:28 PM

Looks fine to me. I will let others that specialize more in the expression evaluator accept this., though it would be good to verify this code looks the same in the Swift branches

This revision is now accepted and ready to land.Sep 7 2021, 5:38 PM
This revision was landed with ongoing or failed builds.Sep 8 2021, 11:28 AM
This revision was automatically updated to reflect the committed changes.