[flang] Add lowering for integer constant
authorValentin Clement <clementval@gmail.com>
Thu, 3 Feb 2022 09:40:19 +0000 (10:40 +0100)
committerValentin Clement <clementval@gmail.com>
Thu, 3 Feb 2022 10:10:30 +0000 (11:10 +0100)
commitdc6a344637a6417aedf85e5fd1236e7fcd43c3f1
tree6ad46573fb007d519bb830d4d6dc299b8c9fd7e0
parentd15e7dd1238df20e9c09cc91930f716e0d3d5b05
[flang] Add lowering for integer constant

This patch enables the lowering of integer constant.

The `ScalarExprLowering` class is introduced in `ConvertExpr.cpp` to help
the lowering of expression. This patch adds all the placeholder as well for future
expression lowering with the appropriate TODOs.

Integer constant expression are lowered to `arith.constant` with an integer type corresponding to the kind value.

This patch is in support of D118787

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: schweitz, kiranchandramohan

Differential Revision: https://reviews.llvm.org/D118786
flang/include/flang/Lower/ConvertExpr.h [new file with mode: 0644]
flang/include/flang/Lower/ConvertType.h
flang/lib/Lower/Bridge.cpp
flang/lib/Lower/CMakeLists.txt
flang/lib/Lower/ConvertExpr.cpp [new file with mode: 0644]
flang/lib/Lower/ConvertType.cpp