This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Breakdown diagnostic string literals
ClosedPublic

Authored by logan on May 18 2022, 4:51 PM.

Details

Summary

This commit breaks down diagnostic string literals so that the attribute
name and enumurator names can be shared with the stringify utility
function and the "expected ", " to be one of ", and ", " can be shared
between different enum-related diagnostic.

Diff Detail

Event Timeline

logan created this revision.May 18 2022, 4:51 PM
Herald added a project: Restricted Project. · View Herald Transcript
logan requested review of this revision.May 18 2022, 4:51 PM

I feel like I'm missing some context here, can you show some form of before/after? or is this intended to be an NFC cleanup?

I feel like I'm missing some context here, can you show some form of before/after? or is this intended to be an NFC cleanup?

It is NFC, the point is that by splitting the string we get multiple individual char* in the binary that can be better deduped by the linked (an attribute name used in many different diagnostics for example)

rriddle accepted this revision.May 24 2022, 1:41 AM
This revision is now accepted and ready to land.May 24 2022, 1:41 AM
This revision was automatically updated to reflect the committed changes.