This is an archive of the discontinued LLVM Phabricator instance.

[Metadata] Fix `addAnnotationMetadata` when appending a string tuple to an existing MDTuple.
ClosedPublic

Authored by zjaffal on Jun 8 2023, 7:57 AM.

Details

Summary

Currently if the MD_Annotation node containd a string node when we add a
string tuple node the string will not be preserved. This change fixes
that issue.

Diff Detail

Event Timeline

zjaffal created this revision.Jun 8 2023, 7:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 8 2023, 7:57 AM
zjaffal requested review of this revision.Jun 8 2023, 7:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 8 2023, 7:57 AM
fhahn added a comment.Jun 8 2023, 9:45 AM

Is it possible to have a test for this?

Is it possible to have a test for this?

At the moment we cannot add a test. Unless we create a dummy pass and call the function between the passes and verify if the metadata gets appended correctly

fhahn accepted this revision.Jun 9 2023, 5:28 AM

Ah makes sense, thanks! LGTM

This revision is now accepted and ready to land.Jun 9 2023, 5:28 AM