[flang-commits] [flang] [flang] Use std::uintptr_t instead of unsigned long for better cross-platform stability (PR #183913)
Eugene Epshteyn via flang-commits
flang-commits at lists.llvm.org
Sun Mar 1 05:40:05 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)>() {
----------------
eugeneepshteyn wrote:
No, I don't think this is correct. Look at the comment on line 105:
```
/// Return a function that returns the type signature model for the type `T`
/// when provided an MLIRContext*. This allows one to translate C(++) function
/// signatures from runtime header files to MLIR signatures into a static table
/// at compile-time.
///
/// For example, when `T` is `int`, return a function that returns the MLIR
/// standard type `i32` when `sizeof(int)` is 4.
```
It's not about specifically `__int64` type, it's about having translation from various types, including `unsigned long`.
If you share the actual error you get when compiling on your system, perhaps a better fix could be made.
https://github.com/llvm/llvm-project/pull/183913
More information about the flang-commits
mailing list