Skip to content

Commit 8634ea5

Browse files
committed
Generate index types for long type in MLIR
1 parent d58107b commit 8634ea5

File tree

1 file changed

+2
-2
lines changed
  • flang/include/flang/Optimizer/Builder/Runtime

1 file changed

+2
-2
lines changed

flang/include/flang/Optimizer/Builder/Runtime/RTBuilder.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ constexpr TypeBuilderFunc getModel<void **>() {
132132
template <>
133133
constexpr TypeBuilderFunc getModel<long>() {
134134
return [](mlir::MLIRContext *context) -> mlir::Type {
135-
return mlir::IntegerType::get(context, 8 * sizeof(long));
135+
return mlir::IndexType::get(context);
136136
};
137137
}
138138
template <>
@@ -173,7 +173,7 @@ constexpr TypeBuilderFunc getModel<long long *>() {
173173
template <>
174174
constexpr TypeBuilderFunc getModel<unsigned long>() {
175175
return [](mlir::MLIRContext *context) -> mlir::Type {
176-
return mlir::IntegerType::get(context, 8 * sizeof(unsigned long));
176+
return mlir::IndexType::get(context);
177177
};
178178
}
179179
template <>

0 commit comments

Comments
 (0)