This is an archive of the discontinued LLVM Phabricator instance.

Print the "no plugin" warning only when there is no plugin
ClosedPublic

Authored by aprantl on Feb 3 2021, 6:21 PM.

Details

Summary

Print the "no plugin" warning only when there is no plugin and not when the typesystem failed to initialize.

rdar://72562341

Diff Detail

Event Timeline

aprantl requested review of this revision.Feb 3 2021, 6:21 PM
aprantl created this revision.
shafik added a subscriber: shafik.Feb 3 2021, 6:57 PM

Can we test this?

Can we test this?

If you can bypass the check for a valid module on line 5682, you might be able to write a unit test by setting the function in the SymbolContext to return an unsupported language.

The feature itself is already being tested by lldb/test/Shell/Process/UnsupportedLanguage.test. In order to test this change we would have to force TypeSystemClang to fail to initialize somehow. The only way to do this would be to pass in an invalid arch, but if we do that we won't get to the point where this warning would be printed. (The bugfix is intended for Swift plugin, which does fail to initialize more easily).

JDevlieghere accepted this revision.Feb 4 2021, 11:04 AM

Perfect, then this LGTM.

This revision is now accepted and ready to land.Feb 4 2021, 11:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 4 2021, 11:06 AM