aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Common
diff options
context:
space:
mode:
authorPeter Klausler <pklausler@nvidia.com>2023-04-10 11:05:03 -0700
committerPeter Klausler <pklausler@nvidia.com>2023-04-19 09:39:37 -0700
commit864cb2aa451480b6d1907fd7bc4262c72b537a7c (patch)
treeeefa308881edb4e6df4dfab3534c75ea1504ccc7 /flang/lib/Common
parent029bfc311d4d7d3cd90be81bb08c046848796d02 (diff)
downloadllvm-864cb2aa451480b6d1907fd7bc4262c72b537a7c.zip
llvm-864cb2aa451480b6d1907fd7bc4262c72b537a7c.tar.gz
llvm-864cb2aa451480b6d1907fd7bc4262c72b537a7c.tar.bz2
[flang] Semantics for !DIR$ IGNORE_TKR
Implement semantics for the IGNORE_TKR directive as it is interpreted by the PGI / NVFORTRAN compiler. Differential Revision: https://reviews.llvm.org/D148643
Diffstat (limited to 'flang/lib/Common')
-rw-r--r--flang/lib/Common/Fortran.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/flang/lib/Common/Fortran.cpp b/flang/lib/Common/Fortran.cpp
index 42c27c9..e8d8fef 100644
--- a/flang/lib/Common/Fortran.cpp
+++ b/flang/lib/Common/Fortran.cpp
@@ -74,4 +74,27 @@ const char *AsFortran(DefinedIo x) {
}
}
+std::string AsFortran(IgnoreTKRSet tkr) {
+ std::string result;
+ if (tkr.test(IgnoreTKR::Type)) {
+ result += 'T';
+ }
+ if (tkr.test(IgnoreTKR::Kind)) {
+ result += 'K';
+ }
+ if (tkr.test(IgnoreTKR::Rank)) {
+ result += 'R';
+ }
+ if (tkr.test(IgnoreTKR::Device)) {
+ result += 'D';
+ }
+ if (tkr.test(IgnoreTKR::Managed)) {
+ result += 'M';
+ }
+ if (tkr.test(IgnoreTKR::Contiguous)) {
+ result += 'C';
+ }
+ return result;
+}
+
} // namespace Fortran::common