[PATCH] D113569: [flang][nfc] Add missing headers in TypeConverter.h
Andrzej Warzynski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 10 07:30:40 PST 2021
awarzynski created this revision.
awarzynski added reviewers: clementval, rovka, kiranchandramohan.
Herald added a reviewer: sscalpone.
Herald added a subscriber: mehdi_amini.
Herald added a project: Flang.
awarzynski requested review of this revision.
Herald added subscribers: llvm-commits, jdoerfert.
Herald added a project: LLVM.
These missing header files wouldn't cause build failures as TypeConverter.h
is currently only included in CodeGen.cpp and that file includes everything
that's needed in TypeConverter.h. However, as per [1], "(...)
include all of the header files that you are using ".
I've also added missing namespace qualifiers in 2 places.
[1] https://llvm.org/docs/CodingStandards.html#include-as-little-as-possible
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D113569
Files:
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,8 +16,11 @@
#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 "mlir/Conversion/LLVMCommon/TypeConverter.h"
+#include "mlir/Transforms//DialectConversion.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/Support/Debug.h"
@@ -95,7 +98,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 +249,7 @@
case llvm::Type::TypeID::FP128TyID:
return mlir::FloatType::getF128(&getContext());
default:
- emitError(UnknownLoc::get(&getContext()))
+ emitError(mlir::UnknownLoc::get(&getContext()))
<< "unsupported type: !fir.real<" << kind << ">";
return {};
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113569.386159.patch
Type: text/x-patch
Size: 1435 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211110/017357cb/attachment.bin>
More information about the llvm-commits
mailing list