[flang] Add getTypeDescriptorBindingTableName function
authorValentin Clement <clementval@gmail.com>
Tue, 18 Oct 2022 17:52:20 +0000 (19:52 +0200)
committerValentin Clement <clementval@gmail.com>
Tue, 18 Oct 2022 17:55:55 +0000 (19:55 +0200)
commit87b2d1d04ed6d2e46e961a9f73bb8d607d8692da
tree07c6545a45952c99cb2c821299ca85db88989fb0
parentf477412685fe6bac49d3d080ba91896c28e62116
[flang] Add getTypeDescriptorBindingTableName function

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.

Reviewed By: jeanPerier

Differential Revision: https://reviews.llvm.org/D136167
flang/include/flang/Optimizer/Support/InternalNames.h
flang/lib/Optimizer/Support/InternalNames.cpp
flang/unittests/Optimizer/InternalNamesTest.cpp