Commit 123eb75
authored
[Flang] Do not emit numeric_storage_size into object file (llvm#131463)
The value of numeric_storage_size depends on compilation options and
therefore its value is not yet known when building the builtins runtime.
Instead, the parameter is folding a __numeric_storage_size() expression
which is loaded into the user program. For the iso_fortran_env object
file, omit the symbol as it is never used.
Similar tests that ensure that __numeric_storage_size() is not folded
until compiling the actual user program exist in FortranEvalutate:
https://github.com/llvm/llvm-project/blob/1e6ba3cd2fe96be00b6ed6ba28b3d9f9271d784d/flang/lib/Evaluate/check-expression.cpp#L487-L492
https://github.com/llvm/llvm-project/blob/1e6ba3cd2fe96be00b6ed6ba28b3d9f9271d784d/flang/lib/Evaluate/fold-integer.cpp#L1457-L1460
Required for using CMake to compile the builtin module files. See RFC at
https://discourse.llvm.org/t/rfc-building-flangs-builtin-mod-files/846261 parent 52de49e commit 123eb75
1 file changed
+19
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5967 | 5967 | | |
5968 | 5968 | | |
5969 | 5969 | | |
| 5970 | + | |
5970 | 5971 | | |
5971 | 5972 | | |
5972 | | - | |
5973 | | - | |
| 5973 | + | |
| 5974 | + | |
| 5975 | + | |
| 5976 | + | |
| 5977 | + | |
| 5978 | + | |
| 5979 | + | |
| 5980 | + | |
| 5981 | + | |
| 5982 | + | |
| 5983 | + | |
| 5984 | + | |
| 5985 | + | |
| 5986 | + | |
| 5987 | + | |
| 5988 | + | |
| 5989 | + | |
| 5990 | + | |
5974 | 5991 | | |
5975 | 5992 | | |
5976 | 5993 | | |
| |||
0 commit comments