diff --git a/flang/lib/Optimizer/CodeGen/TypeConverter.h b/flang/lib/Optimizer/CodeGen/TypeConverter.h --- a/flang/lib/Optimizer/CodeGen/TypeConverter.h +++ b/flang/lib/Optimizer/CodeGen/TypeConverter.h @@ -16,9 +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 "llvm/ADT/StringMap.h" +#include "mlir/Conversion/LLVMCommon/TypeConverter.h" +#include "mlir/Transforms//DialectConversion.h" #include "llvm/Support/Debug.h" namespace fir { @@ -95,7 +97,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 dataDescFields; + llvm::SmallVector dataDescFields; mlir::Type ele = box.getEleTy(); // remove fir.heap/fir.ref/fir.ptr if (auto removeIndirection = fir::dyn_cast_ptrEleTy(ele)) @@ -246,7 +248,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 {}; }