This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Use const reference when looping over Exts in RISCVISAInfo.
ClosedPublic

Authored by craig.topper on Jan 27 2022, 12:20 AM.

Details

Summary

Exts is a map of keyed by std::string with a extension info as
a value. Making copies of this wouldn't be cheap.

We had a mix of references and copies. This makes everything
consistently use a const reference to make it clear we aren't
modifying it.

Diff Detail

Event Timeline

craig.topper created this revision.Jan 27 2022, 12:20 AM
craig.topper requested review of this revision.Jan 27 2022, 12:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 27 2022, 12:20 AM
kito-cheng accepted this revision.Jan 27 2022, 12:35 AM

LGTM, thanks :)

This revision is now accepted and ready to land.Jan 27 2022, 12:35 AM
asb accepted this revision.Jan 27 2022, 7:53 AM

LGTM.

This revision was landed with ongoing or failed builds.Jan 27 2022, 9:24 AM
This revision was automatically updated to reflect the committed changes.