This is an archive of the discontinued LLVM Phabricator instance.

Make genAttributeVerifier escape the summary.
ClosedPublic

Authored by matthiaskramm on Oct 21 2021, 11:06 AM.

Details

Summary

The summary can contain references to e.g. attribute defaults, which
can contain special characters. So these strings need to be C++
escaped.

Diff Detail

Event Timeline

matthiaskramm created this revision.Oct 21 2021, 11:06 AM
matthiaskramm requested review of this revision.Oct 21 2021, 11:06 AM
Mogball requested changes to this revision.Oct 21 2021, 11:56 AM
Mogball added inline comments.
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
371

static functions shouldn't be inside anonymous namespaces. Move this to the top-level.

This revision now requires changes to proceed.Oct 21 2021, 11:56 AM

Move static helper function to top level.

Mogball accepted this revision.Oct 21 2021, 1:10 PM
Mogball added inline comments.
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
374

Oh actually, can you move this up to line 140 "Utility structs and functions"?

Go ahead and land it afterwards.

This revision is now accepted and ready to land.Oct 21 2021, 1:10 PM

Move escapeString to the "utility structs and functions" section.

Jeff, could you land this one for me? I don't have commit access.

This revision was automatically updated to reflect the committed changes.