[fir] Add utility function to FIRBuilder and MutableBox
authorValentin Clement <clementval@gmail.com>
Fri, 22 Oct 2021 07:59:44 +0000 (09:59 +0200)
committerValentin Clement <clementval@gmail.com>
Fri, 22 Oct 2021 08:00:34 +0000 (10:00 +0200)
commita2e7af75166dd840a7537aab29099d666296a7b3
treeec298cfe9d83a3cb3532d648667d39f9b405ea92
parent4ff103c024005fea997143a4bdb7918edd8712eb
[fir] Add utility function to FIRBuilder and MutableBox

This patch is extracted from D111337 to make is smaller.
It introduce utility functions to the FIRBuilder and add the MutableBox
files.

- genShape
- readCharLen
- getExtents

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D112207

Co-authored-by: Jean Perier <jperier@nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
flang/include/flang/Lower/FIRBuilder.h
flang/include/flang/Optimizer/Builder/FIRBuilder.h
flang/include/flang/Optimizer/Builder/MutableBox.h [new file with mode: 0644]
flang/lib/Optimizer/Builder/CMakeLists.txt
flang/lib/Optimizer/Builder/FIRBuilder.cpp
flang/lib/Optimizer/Builder/MutableBox.cpp [new file with mode: 0644]
flang/unittests/Optimizer/Builder/FIRBuilderTest.cpp