This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo][NFC] Use function_ref consistently in debug line parsing
ClosedPublic

Authored by jhenderson on Dec 20 2019, 6:38 AM.

Details

Summary

This patch fixes an inconsistency where we were using std::function in some places and function_ref in others to pass around the error handling callback.

Diff Detail

Event Timeline

jhenderson created this revision.Dec 20 2019, 6:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 20 2019, 6:38 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
MaskRay accepted this revision.Dec 20 2019, 10:16 AM

llvm::function_ref is more common and more efficient (std::function has a heap allocation). These callbacks are not supposed to be stored. LG

This revision is now accepted and ready to land.Dec 20 2019, 10:16 AM
This revision was automatically updated to reflect the committed changes.