This is an archive of the discontinued LLVM Phabricator instance.

[mlir][llvm] Make some debug info attribute parameters optional.

Authored by gysit on Nov 17 2022, 6:42 AM.



The revision makes specific debug information attribute parameters
optional since some of them can be omitted in LLVMIR. The additional
flexibility enables a later revision that will support importing
debug information from LLVMIR. A special case is the types parameter
of the SubroutineTypeAttr. For void functions, its first entry is
null in LLVMIR. This revision splits the type parameter in an optional
resultType parameter and an argumentTypes array to support this corner

Diff Detail

Event Timeline

gysit created this revision.Nov 17 2022, 6:42 AM
Herald added a project: Restricted Project. · View Herald Transcript
gysit requested review of this revision.Nov 17 2022, 6:42 AM
rriddle accepted this revision.Nov 17 2022, 11:48 AM



You can also default this to zero.

This revision is now accepted and ready to land.Nov 17 2022, 11:48 AM
gysit updated this revision to Diff 476366.Nov 18 2022, 12:11 AM
gysit marked an inline comment as done.

Address comment.