[flang-commits] [flang] [flang] Use std::uintptr_t instead of unsigned long for better cross-platform stability (PR #183913)

via flang-commits flang-commits at lists.llvm.org
Sun Mar 1 05:51:43 PST 2026


================
@@ -253,31 +253,17 @@ constexpr TypeBuilderFunc getModel<void (*)(int)>() {
 }
 template <>
 constexpr TypeBuilderFunc
-getModel<void *(*)(void *, const void *, unsigned long)>() {
+getModel<void *(*)(void *, const void *, std::uintptr_t)>() {
----------------
dragon-archer wrote:

I encounter the following error without this patch.
```bash
ld.lld: error: undefined symbol: mlir::Type (*fir::runtime::getModel<void* (*)(void*, void const*, unsigned long long)>())(mlir::MLIRContext*)
>>> referenced by libFIRBuilder.a(Allocatable.cpp.obj):(fir::runtime::RuntimeTableKey<int (Fortran::runtime::Descriptor&, long long*, bool, Fortran::runtime::Descriptor const*, char const*, int, void* (*)(void*, void const*, unsigned long long))>::getTypeModel()::'lambda'(mlir::MLIRContext*)::operator()(mlir::MLIRContext*) const)
```

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


More information about the flang-commits mailing list