This is an archive of the discontinued LLVM Phabricator instance.

[flang] Add getTypeDescriptorBindingTableName function
ClosedPublic

Authored by clementval on Oct 18 2022, 6:29 AM.

Details

Summary

Type descriptor and its binding table are defined as fir.global in FIR.
Their names are derived from the derived-type name. This patch adds a new
function getTypeDescriptorBindingTableName in the NameUniquer and
refactor the GetTypeDescriptorName function to reuse the same code.
This will be used in the fir.dispatch code generation.

Diff Detail

Event Timeline

clementval created this revision.Oct 18 2022, 6:29 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 18 2022, 6:29 AM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
clementval requested review of this revision.Oct 18 2022, 6:29 AM

clang-format

Aside from a couple of nits, all builds and tests correctly and looks good.

flang/include/flang/Optimizer/Support/InternalNames.h
148

Should read "Given a" rather than "Given an".

149

Should read "is not a valid".

jeanPerier accepted this revision.Oct 18 2022, 8:30 AM

Nothing to add to Pete's comment.

This revision is now accepted and ready to land.Oct 18 2022, 8:30 AM
This revision was automatically updated to reflect the committed changes.