[flang-commits] [PATCH] D83060: [flang] Clean up binary dependences of runtime libraries

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu Jul 2 10:14:35 PDT 2020


klausler created this revision.
klausler added reviewers: tskeith, PeteSteinfeld, sscalpone.
klausler added a project: Flang.
Herald added a reviewer: jdoerfert.
Herald added a reviewer: DavidTruby.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83060

Files:
  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


Index: flang/runtime/transformational.cpp
===================================================================
--- flang/runtime/transformational.cpp
+++ 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>
 
Index: flang/lib/Semantics/mod-file.h
===================================================================
--- flang/lib/Semantics/mod-file.h
+++ 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 {
Index: flang/lib/Decimal/binary-to-decimal.cpp
===================================================================
--- flang/lib/Decimal/binary-to-decimal.cpp
+++ flang/lib/Decimal/binary-to-decimal.cpp
@@ -389,8 +389,8 @@
 }
 
 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 << '-';
   }
Index: flang/lib/Decimal/big-radix-floating-point.h
===================================================================
--- flang/lib/Decimal/big-radix-floating-point.h
+++ 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 @@
   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)
Index: flang/include/flang/Common/enum-set.h
===================================================================
--- flang/include/flang/Common/enum-set.h
+++ 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 @@
     }
   }
 
-  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);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83060.275155.patch
Type: text/x-patch
Size: 2762 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20200702/af8785a7/attachment-0001.bin>


More information about the flang-commits mailing list