[flang-commits] [flang] 7cccd49 - [flang] Clean up binary dependences of runtime libraries
peter klausler via flang-commits
flang-commits at lists.llvm.org
Thu Jul 2 12:28:11 PDT 2020
Author: peter klausler
Date: 2020-07-02T12:27:01-07:00
New Revision: 7cccd49a553b6381f57f0ad8545fd5ea9e329afd
URL: https://github.com/llvm/llvm-project/commit/7cccd49a553b6381f57f0ad8545fd5ea9e329afd
DIFF: https://github.com/llvm/llvm-project/commit/7cccd49a553b6381f57f0ad8545fd5ea9e329afd.diff
LOG: [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
Added:
Modified:
flang/include/flang/Common/enum-set.h
flang/lib/Decimal/big-radix-floating-point.h
flang/lib/Decimal/binary-to-decimal.cpp
flang/lib/Semantics/mod-file.h
flang/runtime/transformational.cpp
Removed:
################################################################################
diff --git a/flang/include/flang/Common/enum-set.h b/flang/include/flang/Common/enum-set.h
index 4d2bc1e7433c..a7bdc757a1c9 100644
--- 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 <bitset>
#include <cstddef>
#include <initializer_list>
@@ -206,8 +205,8 @@ template <typename ENUM, std::size_t BITS> class EnumSet {
}
}
- 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);
diff --git a/flang/lib/Decimal/big-radix-floating-point.h b/flang/lib/Decimal/big-radix-floating-point.h
index 18626e2b55df..53bd9d724914 100644
--- 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 <cinttypes>
#include <limits>
#include <type_traits>
@@ -112,7 +111,7 @@ template <int PREC, int LOG10RADIX = 16> class BigRadixFloatingPointNumber {
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)
diff --git a/flang/lib/Decimal/binary-to-decimal.cpp b/flang/lib/Decimal/binary-to-decimal.cpp
index 02e39c241ee1..ad30b4d85403 100644
--- a/flang/lib/Decimal/binary-to-decimal.cpp
+++ b/flang/lib/Decimal/binary-to-decimal.cpp
@@ -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 << '-';
}
diff --git a/flang/lib/Semantics/mod-file.h b/flang/lib/Semantics/mod-file.h
index 2800f315054e..8823c5f1e497 100644
--- 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 <string>
namespace Fortran::parser {
diff --git a/flang/runtime/transformational.cpp b/flang/runtime/transformational.cpp
index eabb08202af7..69de8ffc57ab 100644
--- 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 <algorithm>
#include <cinttypes>
More information about the flang-commits
mailing list