llvm-project
123eb75c - [Flang] Do not emit numeric_storage_size into object file (#131463)

Commit
320 days ago
[Flang] Do not emit numeric_storage_size into object file (#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/84626
Author
Parents
Loading