[flang-commits] [flang] [flang] Change `uniqueCGIdent` separator from `.` to `_` (PR #71338)

via flang-commits flang-commits at lists.llvm.org
Mon Nov 6 01:49:00 PST 2023


https://github.com/jeanPerier commented:

Thanks, this looks good to me.

Thanks @kiranchandramohan for pointing out the documentation and demangling. The constant litteral name are "QQ" internal name that are not meant to be demangled to some symbol + scope, and we do not document the mangling of the internal QQ name (they do not really matter from a Fortran ABI point of view since constant literals should be local to compilation units). The documentation only mentions QQ is reserved for internal names, so it is still valid after this change.

@fabianmcg, note that I see at least a couple of other cases where dots may be emitted in assembly names.
- When dealing with array literals (as opposed to scalars like in this patch): https://github.com/llvm/llvm-project/blob/58679ea576f9e48e20e43dcd99fd75c98fb7e6ba/flang/lib/Lower/Mangler.cpp#L283
- runtime type info is currently using dots (only matters if some runtime using derived type descriptors make it to the device I guess). https://github.com/llvm/llvm-project/blob/58679ea576f9e48e20e43dcd99fd75c98fb7e6ba/flang/test/Lower/derived-type-descriptor.f90#L14

https://github.com/llvm/llvm-project/pull/71338


More information about the flang-commits mailing list