diff --git a/flang/include/flang/Common/enum-set.h b/flang/include/flang/Common/enum-set.h --- a/flang/include/flang/Common/enum-set.h +++ b/flang/include/flang/Common/enum-set.h @@ -16,7 +16,6 @@ #include "constexpr-bitset.h" #include "idioms.h" -#include "llvm/Support/raw_ostream.h" #include #include #include @@ -206,8 +205,8 @@ } } - llvm::raw_ostream &Dump( - llvm::raw_ostream &o, std::string EnumToString(enumerationType)) const { + template + STREAM &Dump(STREAM &o, std::string EnumToString(enumerationType)) const { char sep{'{'}; IterateOverMembers([&](auto e) { o << sep << EnumToString(e); diff --git a/flang/lib/Decimal/big-radix-floating-point.h b/flang/lib/Decimal/big-radix-floating-point.h --- a/flang/lib/Decimal/big-radix-floating-point.h +++ b/flang/lib/Decimal/big-radix-floating-point.h @@ -27,7 +27,6 @@ #include "flang/Common/unsigned-const-division.h" #include "flang/Decimal/binary-floating-point.h" #include "flang/Decimal/decimal.h" -#include "llvm/Support/raw_ostream.h" #include #include #include @@ -112,7 +111,7 @@ void Minimize( BigRadixFloatingPointNumber &&less, BigRadixFloatingPointNumber &&more); - llvm::raw_ostream &Dump(llvm::raw_ostream &) const; + template STREAM &Dump(STREAM &) const; private: BigRadixFloatingPointNumber(const BigRadixFloatingPointNumber &that) diff --git a/flang/lib/Decimal/binary-to-decimal.cpp b/flang/lib/Decimal/binary-to-decimal.cpp --- a/flang/lib/Decimal/binary-to-decimal.cpp +++ b/flang/lib/Decimal/binary-to-decimal.cpp @@ -389,8 +389,8 @@ } template -llvm::raw_ostream &BigRadixFloatingPointNumber::Dump( - llvm::raw_ostream &o) const { +template +STREAM &BigRadixFloatingPointNumber::Dump(STREAM &o) const { if (isNegative_) { o << '-'; } diff --git a/flang/lib/Semantics/mod-file.h b/flang/lib/Semantics/mod-file.h --- a/flang/lib/Semantics/mod-file.h +++ b/flang/lib/Semantics/mod-file.h @@ -10,6 +10,7 @@ #define FORTRAN_SEMANTICS_MOD_FILE_H_ #include "flang/Semantics/attr.h" +#include "llvm/Support/raw_ostream.h" #include namespace Fortran::parser { diff --git a/flang/runtime/transformational.cpp b/flang/runtime/transformational.cpp --- a/flang/runtime/transformational.cpp +++ b/flang/runtime/transformational.cpp @@ -9,7 +9,6 @@ #include "transformational.h" #include "memory.h" #include "terminator.h" -#include "flang/Evaluate/integer.h" #include #include