[flang] Clean up binary dependences of runtime libraries

There were dependences upon LLVM libraries in the Fortran
runtime support library binaries due to some indirect #includes
of llvm/Support/raw_ostream.h, which caused some kind of internal
ABI version consistency checking to get pulled in.  Fixed by
cleaning up some includes.

Reviewed By: tskeith, PeteSteinfeld, sscalpone

Differential Revision: https://reviews.llvm.org/D83060
This commit is contained in:
peter klausler 2020-07-02 09:52:48 -07:00
parent 70f2bcc197
commit 7cccd49a55
5 changed files with 6 additions and 8 deletions

View File

@ -16,7 +16,6 @@
#include "constexpr-bitset.h"
#include "idioms.h"
#include "llvm/Support/raw_ostream.h"
#include <bitset>
#include <cstddef>
#include <initializer_list>
@ -206,8 +205,8 @@ public:
}
}
llvm::raw_ostream &Dump(
llvm::raw_ostream &o, std::string EnumToString(enumerationType)) const {
template <typename STREAM>
STREAM &Dump(STREAM &o, std::string EnumToString(enumerationType)) const {
char sep{'{'};
IterateOverMembers([&](auto e) {
o << sep << EnumToString(e);

View File

@ -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 <cinttypes>
#include <limits>
#include <type_traits>
@ -112,7 +111,7 @@ public:
void Minimize(
BigRadixFloatingPointNumber &&less, BigRadixFloatingPointNumber &&more);
llvm::raw_ostream &Dump(llvm::raw_ostream &) const;
template <typename STREAM> STREAM &Dump(STREAM &) const;
private:
BigRadixFloatingPointNumber(const BigRadixFloatingPointNumber &that)

View File

@ -389,8 +389,8 @@ ConversionToDecimalResult ConvertLongDoubleToDecimal(char *buffer,
}
template <int PREC, int LOG10RADIX>
llvm::raw_ostream &BigRadixFloatingPointNumber<PREC, LOG10RADIX>::Dump(
llvm::raw_ostream &o) const {
template <typename STREAM>
STREAM &BigRadixFloatingPointNumber<PREC, LOG10RADIX>::Dump(STREAM &o) const {
if (isNegative_) {
o << '-';
}

View File

@ -10,6 +10,7 @@
#define FORTRAN_SEMANTICS_MOD_FILE_H_
#include "flang/Semantics/attr.h"
#include "llvm/Support/raw_ostream.h"
#include <string>
namespace Fortran::parser {

View File

@ -9,7 +9,6 @@
#include "transformational.h"
#include "memory.h"
#include "terminator.h"
#include "flang/Evaluate/integer.h"
#include <algorithm>
#include <cinttypes>