From: peter klausler Date: Mon, 4 Mar 2019 19:55:10 +0000 (-0800) Subject: [flang] check out with all versions X-Git-Tag: llvmorg-12-init~9537^2~1695 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b67a04c0bb438ce737af88ff82d596b58268bc58;p=platform%2Fupstream%2Fllvm.git [flang] check out with all versions Original-commit: flang-compiler/f18@0b1369ce5511d728c10c1b00ca14a2c9c4572ac7 Reviewed-on: https://github.com/flang-compiler/f18/pull/313 Tree-same-pre-rewrite: false --- diff --git a/flang/lib/common/indirection.h b/flang/lib/common/indirection.h index 620690c..ec8a788 100644 --- a/flang/lib/common/indirection.h +++ b/flang/lib/common/indirection.h @@ -209,4 +209,12 @@ private: } \ } } + +#define DEFINE_OWNING_POINTER_COPY_FUNCTIONS(A) \ + DEFINE_OWNING_POINTER_COPY_CONSTRUCTORS(A) \ + DEFINE_OWNING_POINTER_COPY_ASSIGNMENTS(A) +#define DEFINE_OWNING_POINTER_SPECIAL_FUNCTIONS(A) \ + DEFINE_OWNING_POINTER_DESTRUCTOR(A) \ + DEFINE_OWNING_POINTER_COPY_FUNCTIONS(A) + #endif // FORTRAN_COMMON_INDIRECTION_H_ diff --git a/flang/lib/evaluate/characteristics.cc b/flang/lib/evaluate/characteristics.cc index c2dfa3b..088dd9c 100644 --- a/flang/lib/evaluate/characteristics.cc +++ b/flang/lib/evaluate/characteristics.cc @@ -101,6 +101,4 @@ std::ostream &Procedure::Dump(std::ostream &o) const { } // Define OwningPointer special member functions -DEFINE_OWNING_POINTER_DESTRUCTOR(evaluate::characteristics::Procedure) -DEFINE_OWNING_POINTER_COPY_CONSTRUCTORS(evaluate::characteristics::Procedure) -DEFINE_OWNING_POINTER_COPY_ASSIGNMENTS(evaluate::characteristics::Procedure) +DEFINE_OWNING_POINTER_SPECIAL_FUNCTIONS(evaluate::characteristics::Procedure) diff --git a/flang/lib/evaluate/characteristics.h b/flang/lib/evaluate/characteristics.h index e445247c..d1389e1 100644 --- a/flang/lib/evaluate/characteristics.h +++ b/flang/lib/evaluate/characteristics.h @@ -31,15 +31,10 @@ #include #include -// Forward declare Procedure so dummy procedures can use it indirectly namespace Fortran::evaluate::characteristics { -struct Procedure; -} -namespace Fortran::common { -extern template class OwningPointer; -} -namespace Fortran::evaluate::characteristics { +// Forward declare Procedure so dummy procedures can use it indirectly +struct Procedure; // 15.3.2.2 struct DummyDataObject { diff --git a/flang/lib/evaluate/expression.cc b/flang/lib/evaluate/expression.cc index 7f4cd1f..b48dc7f 100644 --- a/flang/lib/evaluate/expression.cc +++ b/flang/lib/evaluate/expression.cc @@ -321,4 +321,4 @@ FOR_EACH_INTRINSIC_KIND(template class ArrayConstructor) // been embedded in the parse tree. This destructor appears here, where // definitions for all the necessary types are available, to obviate a // need to include lib/evaluate/*.h headers in the parser proper. -DEFINE_OWNING_POINTER_DESTRUCTOR(evaluate::GenericExprWrapper) +DEFINE_OWNING_POINTER_SPECIAL_FUNCTIONS(evaluate::GenericExprWrapper) diff --git a/flang/lib/evaluate/expression.h b/flang/lib/evaluate/expression.h index 235fde2..f011330 100644 --- a/flang/lib/evaluate/expression.h +++ b/flang/lib/evaluate/expression.h @@ -762,7 +762,7 @@ public: }; // This wrapper class is used, by means of a forward reference with -// OwningPointer, to implement owning pointers to analyzed expressions +// OwningPointer , to implement owning pointers to analyzed expressions // from parse tree nodes. struct GenericExprWrapper { GenericExprWrapper(Expr &&x) : v{std::move(x)} {}