[flang][NFC] Remove CallBuilder class
authorJean Perier <jperier@nvidia.com>
Thu, 12 Jan 2023 09:14:07 +0000 (10:14 +0100)
committerJean Perier <jperier@nvidia.com>
Thu, 12 Jan 2023 09:16:09 +0000 (10:16 +0100)
commit3909b60a3c87a85518d2846cdd00f6f985e4f7d8
treeef8a67a6034ed1b34149117b3a68230ba46c287d
parentffc3051d0fb7ef32e0af86571251d1f35eb191bd
[flang][NFC] Remove CallBuilder class

The methods of CallBuilder do need to belong to a class.
This was made to avoid having to propagate generic lowering context
(converter, symbol mappings, location and StatementContext).

Packaging them together will actually make it harder to share the code
for user and intrinsic elemental lowering (I plan to use C++ CRTP),
and it is also misleading: one could think there is something going
with the class state while lowering the function while there is not
(and there should not be).

Removes the class and turns the methods into static functions.
Add a new CallContext class to solve the argument threading
inconvenience.

This contains no functional changes at all.

Differential Revision: https://reviews.llvm.org/D141510
flang/lib/Lower/ConvertCall.cpp