This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Use a lambda to avoid having the Support library depend on Option library.
ClosedPublic

Authored by craig.topper on Oct 18 2021, 1:34 PM.

Details

Summary

RISCVISAInfo::toFeatures needs to allocate strings using
ArgList::MakeArgString, but toFeatures lives in Support and
MakeArgString lives in Option.

toFeature only has one caller, so the simple fix is to have that
caller pass a lamdba that wraps MakeArgString to break the
dependency.

Diff Detail

Event Timeline

craig.topper created this revision.Oct 18 2021, 1:34 PM
craig.topper requested review of this revision.Oct 18 2021, 1:34 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 18 2021, 1:34 PM
Herald added a subscriber: MaskRay. · View Herald Transcript
jrtc27 accepted this revision.Oct 18 2021, 1:35 PM
This revision is now accepted and ready to land.Oct 18 2021, 1:35 PM
This revision was landed with ongoing or failed builds.Oct 18 2021, 1:44 PM
This revision was automatically updated to reflect the committed changes.