This is an archive of the discontinued LLVM Phabricator instance.

[mlir][llvm] Rename void debug type to null
ClosedPublic

Authored by Dinistro on Feb 15 2023, 8:18 AM.

Details

Summary

This commit renames the "di_void_result_type" to "di_null_type" as LLVM
does use null not exclusively for void types. An added test demonstrates
this for variadic function declarations, whose DISubroutine indicates the
start of variadic types with null.

Diff Detail

Event Timeline

Dinistro created this revision.Feb 15 2023, 8:18 AM
Herald added a project: Restricted Project. · View Herald Transcript
Dinistro requested review of this revision.Feb 15 2023, 8:18 AM
gysit accepted this revision.Feb 15 2023, 10:55 AM

Thanks for the fix!

mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td
267–268

nit: maybe align with "DINullType" above.

mlir/lib/Target/LLVMIR/DebugImporter.cpp
153–154

nit: Let's maybe mention the variadic types.

"A nullptr entry may appear at the beginning or the end of the subroutine types list modeling either a void result type or the type of a variadic argument."

This revision is now accepted and ready to land.Feb 15 2023, 10:55 AM
Dinistro updated this revision to Diff 497944.Feb 16 2023, 2:36 AM
Dinistro marked 2 inline comments as done.

address review comments

This revision was landed with ongoing or failed builds.Feb 16 2023, 3:15 AM
This revision was automatically updated to reflect the committed changes.