diff --git a/flang/lib/Optimizer/CodeGen/CodeGen.cpp b/flang/lib/Optimizer/CodeGen/CodeGen.cpp --- a/flang/lib/Optimizer/CodeGen/CodeGen.cpp +++ b/flang/lib/Optimizer/CodeGen/CodeGen.cpp @@ -14,11 +14,8 @@ #include "PassDetail.h" #include "flang/ISO_Fortran_binding.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" 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,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" // Position of the different values in a `fir.box`. @@ -111,7 +112,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)) @@ -269,7 +270,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 {}; }