[PATCH] D113569: [flang][nfc] Add missing headers in TypeConverter.h

Andrzej Warzynski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 11 01:39:49 PST 2021


awarzynski updated this revision to Diff 386447.
awarzynski added a comment.

Address the remaining comments


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113569

Files:
  flang/lib/Optimizer/CodeGen/CodeGen.cpp
  flang/lib/Optimizer/CodeGen/TypeConverter.h


Index: flang/lib/Optimizer/CodeGen/TypeConverter.h
===================================================================
--- flang/lib/Optimizer/CodeGen/TypeConverter.h
+++ flang/lib/Optimizer/CodeGen/TypeConverter.h
@@ -16,9 +16,10 @@
 #include "DescriptorModel.h"
 #include "Target.h"
 #include "flang/Lower/Todo.h" // remove when TODO's are done
+#include "flang/Optimizer/Dialect/FIRType.h"
 #include "flang/Optimizer/Support/FIRContext.h"
 #include "flang/Optimizer/Support/KindMapping.h"
-#include "llvm/ADT/StringMap.h"
+#include "mlir/Conversion/LLVMCommon/TypeConverter.h"
 #include "llvm/Support/Debug.h"
 
 namespace fir {
@@ -95,7 +96,7 @@
   // the addendum defined in descriptor.h.
   mlir::Type convertBoxType(BoxType box, int rank = unknownRank()) {
     // (base_addr*, elem_len, version, rank, type, attribute, f18Addendum, [dim]
-    SmallVector<mlir::Type> dataDescFields;
+    llvm::SmallVector<mlir::Type> dataDescFields;
     mlir::Type ele = box.getEleTy();
     // remove fir.heap/fir.ref/fir.ptr
     if (auto removeIndirection = fir::dyn_cast_ptrEleTy(ele))
@@ -246,7 +247,7 @@
     case llvm::Type::TypeID::FP128TyID:
       return mlir::FloatType::getF128(&getContext());
     default:
-      emitError(UnknownLoc::get(&getContext()))
+      mlir::emitError(mlir::UnknownLoc::get(&getContext()))
           << "unsupported type: !fir.real<" << kind << ">";
       return {};
     }
Index: flang/lib/Optimizer/CodeGen/CodeGen.cpp
===================================================================
--- flang/lib/Optimizer/CodeGen/CodeGen.cpp
+++ flang/lib/Optimizer/CodeGen/CodeGen.cpp
@@ -13,11 +13,8 @@
 #include "flang/Optimizer/CodeGen/CodeGen.h"
 #include "PassDetail.h"
 #include "flang/Optimizer/Dialect/FIROps.h"
-#include "flang/Optimizer/Dialect/FIRType.h"
-#include "flang/Optimizer/Support/FIRContext.h"
 #include "mlir/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.h"
 #include "mlir/Conversion/LLVMCommon/Pattern.h"
-#include "mlir/Conversion/LLVMCommon/TypeConverter.h"
 #include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h"
 #include "mlir/IR/BuiltinTypes.h"
 #include "mlir/IR/Matchers.h"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113569.386447.patch
Type: text/x-patch
Size: 2143 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211111/cf85cad0/attachment.bin>


More information about the llvm-commits mailing list