[PATCH] D96154: [flang][NFC] Make KindTy consistent and consistently used.

Eric Schweitz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 5 10:55:32 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGa1a1d338e99d: [flang][NFC] Make KindTy consistent and consistently used. (authored by schweitz).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96154/new/

https://reviews.llvm.org/D96154

Files:
  flang/include/flang/Optimizer/Dialect/FIRType.h
  flang/lib/Optimizer/Dialect/FIRType.cpp


Index: flang/lib/Optimizer/Dialect/FIRType.cpp
===================================================================
--- flang/lib/Optimizer/Dialect/FIRType.cpp
+++ flang/lib/Optimizer/Dialect/FIRType.cpp
@@ -5,9 +5,14 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
+//
+// Coding style: https://mlir.llvm.org/getting_started/DeveloperGuide/
+//
+//===----------------------------------------------------------------------===//
 
 #include "flang/Optimizer/Dialect/FIRType.h"
 #include "flang/Optimizer/Dialect/FIRDialect.h"
+#include "mlir/IR/Builders.h"
 #include "mlir/IR/Diagnostics.h"
 #include "mlir/IR/DialectImplementation.h"
 #include "llvm/ADT/SmallPtrSet.h"
@@ -838,7 +843,7 @@
   return Base::get(ctxt, kind);
 }
 
-int fir::CharacterType::getFKind() const { return getImpl()->getFKind(); }
+KindTy fir::CharacterType::getFKind() const { return getImpl()->getFKind(); }
 
 // Field
 
@@ -858,7 +863,7 @@
   return Base::get(ctxt, kind);
 }
 
-int fir::LogicalType::getFKind() const { return getImpl()->getFKind(); }
+KindTy fir::LogicalType::getFKind() const { return getImpl()->getFKind(); }
 
 // INTEGER
 
@@ -866,7 +871,7 @@
   return Base::get(ctxt, kind);
 }
 
-int fir::IntegerType::getFKind() const { return getImpl()->getFKind(); }
+KindTy fir::IntegerType::getFKind() const { return getImpl()->getFKind(); }
 
 // COMPLEX
 
@@ -886,7 +891,7 @@
   return Base::get(ctxt, kind);
 }
 
-int fir::RealType::getFKind() const { return getImpl()->getFKind(); }
+KindTy fir::RealType::getFKind() const { return getImpl()->getFKind(); }
 
 // Box<T>
 
Index: flang/include/flang/Optimizer/Dialect/FIRType.h
===================================================================
--- flang/include/flang/Optimizer/Dialect/FIRType.h
+++ flang/include/flang/Optimizer/Dialect/FIRType.h
@@ -36,7 +36,7 @@
 
 class FIROpsDialect;
 
-using KindTy = int;
+using KindTy = unsigned;
 
 namespace detail {
 struct BoxTypeStorage;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96154.321829.patch
Type: text/x-patch
Size: 2028 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210205/b9c251d3/attachment.bin>


More information about the llvm-commits mailing list