diff options
author | River Riddle <riddleriver@gmail.com> | 2020-12-17 12:24:45 -0800 |
---|---|---|
committer | River Riddle <riddleriver@gmail.com> | 2020-12-17 13:01:36 -0800 |
commit | 1b97cdf885d6455841280b8da858835e641ee941 (patch) | |
tree | acd8503bb6e0b42cb9a06d3670742c5f958990ae /flang/lib/Lower/ConvertType.cpp | |
parent | 511cfe9441955f20a8b93573fb9b62433b053550 (diff) | |
download | llvm-1b97cdf885d6455841280b8da858835e641ee941.zip llvm-1b97cdf885d6455841280b8da858835e641ee941.tar.gz llvm-1b97cdf885d6455841280b8da858835e641ee941.tar.bz2 |
[mlir][IR][NFC] Move context/location parameters of builtin Type::get methods to the start of the parameter list
This better matches the rest of the infrastructure, is much simpler, and makes it easier to move these types to being declaratively specified.
Differential Revision: https://reviews.llvm.org/D93432
Diffstat (limited to 'flang/lib/Lower/ConvertType.cpp')
-rw-r--r-- | flang/lib/Lower/ConvertType.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/flang/lib/Lower/ConvertType.cpp b/flang/lib/Lower/ConvertType.cpp index 746d7ad..b3fa85d 100644 --- a/flang/lib/Lower/ConvertType.cpp +++ b/flang/lib/Lower/ConvertType.cpp @@ -49,7 +49,7 @@ mlir::Type genFIRType(mlir::MLIRContext *context) { if constexpr (TC == Fortran::common::TypeCategory::Integer) { auto bits{Fortran::evaluate::Type<Fortran::common::TypeCategory::Integer, KIND>::Scalar::bits}; - return mlir::IntegerType::get(bits, context); + return mlir::IntegerType::get(context, bits); } else if constexpr (TC == Fortran::common::TypeCategory::Logical || TC == Fortran::common::TypeCategory::Character || TC == Fortran::common::TypeCategory::Complex) { @@ -278,7 +278,7 @@ private: // some sequence of `n` bytes mlir::Type gen(const Fortran::evaluate::StaticDataObject::Pointer &ptr) { - mlir::Type byteTy{mlir::IntegerType::get(8, context)}; + mlir::Type byteTy{mlir::IntegerType::get(context, 8)}; return fir::SequenceType::get(trivialShape(ptr->itemBytes()), byteTy); } |