This is an archive of the discontinued LLVM Phabricator instance.

[lldb/Core] Remove more duplicate code in PluginManager (NFCI)
ClosedPublic

Authored by JDevlieghere on Feb 18 2020, 11:47 PM.

Details

Summary

The PluginManager contains a lot of duplicate code. I already removed a bunch of it by introducing a the templated PluginInstance class, and this is the next step in the process.

There's a lot more that can be done, but for these kind of changes I like to work incrementally. Given that this touches a lot of code I'd appreciate a second set of eyes to spot any mistakes.

Diff Detail

Event Timeline

JDevlieghere created this revision.Feb 18 2020, 11:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 18 2020, 11:47 PM
Herald added a subscriber: abidh. · View Herald Transcript
JDevlieghere edited the summary of this revision. (Show Details)Feb 18 2020, 11:49 PM
teemperor accepted this revision.Feb 18 2020, 11:50 PM

LGTM, let’s send that code to the shadow realm.

This revision is now accepted and ready to land.Feb 18 2020, 11:50 PM
This revision was automatically updated to reflect the committed changes.

Very nice.

I'm not really sure why we need that mutex in the first place. All the plugin registration happens when we're still single-threaded. I'd be tempted to just delete it.

Very nice.

I'm not really sure why we need that mutex in the first place. All the plugin registration happens when we're still single-threaded. I'd be tempted to just delete it.

Sounds good to me :-)

Very nice.

I'm not really sure why we need that mutex in the first place. All the plugin registration happens when we're still single-threaded. I'd be tempted to just delete it.

Sounds good to me :-)

Done in df590f51b62d57c19f8cae8e87c1641dc0382f55