[flang-commits] [flang] a58f362 - [flang] Remove interfaces for Character[Min|Max][Val|Loc]. NFC

Diana Picus via flang-commits flang-commits at lists.llvm.org
Wed Apr 28 00:58:23 PDT 2021


Author: Diana Picus
Date: 2021-04-28T07:58:06Z
New Revision: a58f362fb5dd61328fddd70f0e45451a760c3959

URL: https://github.com/llvm/llvm-project/commit/a58f362fb5dd61328fddd70f0e45451a760c3959
DIFF: https://github.com/llvm/llvm-project/commit/a58f362fb5dd61328fddd70f0e45451a760c3959.diff

LOG: [flang] Remove interfaces for Character[Min|Max][Val|Loc]. NFC

MAXVAL, MINVAL, MAXLOC and MINLOC are already implemented in extrema.cpp
as MaxvalCharacter, MinvalDim etc. Therefore, the interfaces in
character.h are redundant and should be removed to avoid confusion.

Differential Revision: https://reviews.llvm.org/D101354

Added: 
    

Modified: 
    flang/runtime/character.cpp
    flang/runtime/character.h

Removed: 
    


################################################################################
diff  --git a/flang/runtime/character.cpp b/flang/runtime/character.cpp
index a6757b06d3003..3b383bb29ea5c 100644
--- a/flang/runtime/character.cpp
+++ b/flang/runtime/character.cpp
@@ -1024,8 +1024,5 @@ void RTNAME(CharacterMin)(Descriptor &accumulator, const Descriptor &x,
     const char *sourceFile, int sourceLine) {
   MaxMin<true>(accumulator, x, sourceFile, sourceLine);
 }
-
-// TODO: Character MAXVAL/MINVAL
-// TODO: Character MAXLOC/MINLOC
 }
 } // namespace Fortran::runtime

diff  --git a/flang/runtime/character.h b/flang/runtime/character.h
index 8e5475ca17bc5..622fbca17cf6b 100644
--- a/flang/runtime/character.h
+++ b/flang/runtime/character.h
@@ -105,18 +105,6 @@ void RTNAME(CharacterMax)(Descriptor &accumulator, const Descriptor &x,
     const char *sourceFile = nullptr, int sourceLine = 0);
 void RTNAME(CharacterMin)(Descriptor &accumulator, const Descriptor &x,
     const char *sourceFile = nullptr, int sourceLine = 0);
-void RTNAME(CharacterMaxVal)(Descriptor &result, const Descriptor &x,
-    int dim = 0, const Descriptor *mask = nullptr,
-    const char *sourceFile = nullptr, int sourceLine = 0);
-void RTNAME(CharacterMinVal)(Descriptor &result, const Descriptor &x,
-    int dim = 0, const Descriptor *mask = nullptr,
-    const char *sourceFile = nullptr, int sourceLine = 0);
-void RTNAME(CharacterMaxLoc)(Descriptor &result, const Descriptor &x,
-    int dim = 0, const Descriptor *mask = nullptr, int kind = sizeof(int),
-    bool back = false, const char *sourceFile = nullptr, int sourceLine = 0);
-void RTNAME(CharacterMinLoc)(Descriptor &result, const Descriptor &x,
-    int dim = 0, const Descriptor *mask = nullptr, int kind = sizeof(int),
-    bool back = false, const char *sourceFile = nullptr, int sourceLine = 0);
 
 std::size_t RTNAME(Index1)(const char *, std::size_t, const char *substring,
     std::size_t, bool back = false);


        


More information about the flang-commits mailing list