This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Add a TargetFuncName field in DISubprogram.
ClosedPublic

Authored by cchen15 on Apr 13 2022, 11:06 AM.

Details

Summary

The new field is for specifying DW_AT_trampoline as a string. Also update the signature of DIBuilder::createFunction to reflect this addition.

Diff Detail

Event Timeline

cchen15 created this revision.Apr 13 2022, 11:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2022, 11:06 AM
cchen15 requested review of this revision.Apr 13 2022, 11:06 AM
Herald added a project: Restricted Project. · View Herald Transcript

Mechanically I think this looks fine, could you also update SourceLevelDebugging.rst?

llvm/test/Bitcode/DISubprogram-targetfuncname.ll
4 ↗(On Diff #422568)

I think this should be doing two full roundtrips and be in the test/Assembler directory.

cchen15 updated this revision to Diff 423068.Apr 15 2022, 5:46 AM

Doubled round-trip and moved the test to test/Assembler.

cchen15 marked an inline comment as done.Apr 15 2022, 5:46 AM

could you also update SourceLevelDebugging.rst?

@aprantl : I quickly scanned the document and didn't see a suitable place for this type of 'detail' attribute. Could you please make a suggestion? Note that this is not language specific and I've updated the comment for DIBuilder::createFunction so that the field's description should show up in the DIBuilder API doc.

I would put it for example into the Fortran function information section and just add a source code example (if that makes sense) to explain under what cirumstances a frontend would want to put in a target function name.

cchen15 updated this revision to Diff 423138.Apr 15 2022, 11:10 AM

Updated SourceLevelDebugging.rst.

Thanks, @aprantl for the suggestion. Please review the doc change.

aprantl accepted this revision.Apr 15 2022, 1:24 PM
This revision is now accepted and ready to land.Apr 15 2022, 1:24 PM
This revision was landed with ongoing or failed builds.Apr 15 2022, 1:41 PM
This revision was automatically updated to reflect the committed changes.