[flang-commits] [PATCH] D148365: [flang] Remove `ignoring all compiler directives` warning
vdonaldson via Phabricator via flang-commits
flang-commits at lists.llvm.org
Fri Apr 14 12:19:59 PDT 2023
vdonaldson created this revision.
vdonaldson added a project: Flang.
Herald added subscribers: sunshaoce, mehdi_amini, jdoerfert.
Herald added a project: All.
vdonaldson requested review of this revision.
The explicit `ignoring all compiler directives` reminder warning is no
longer accurate. Any similar, more accurate message is best generated
by the front end (change pending).
https://reviews.llvm.org/D148365
Files:
flang/lib/Lower/Bridge.cpp
flang/test/Lower/compiler-directive.f90
Index: flang/test/Lower/compiler-directive.f90
===================================================================
--- flang/test/Lower/compiler-directive.f90
+++ /dev/null
@@ -1,13 +0,0 @@
-! RUN: bbc %s -o - 2>&1 | FileCheck %s
-! RUN: %flang_fc1 -emit-fir %s -o - 2>&1 | FileCheck %s
-
-! CHECK: ignoring all compiler directives
-
-MODULE test_mod
- CONTAINS
- SUBROUTINE foo()
- REAL :: var
- !DIR$ VECTOR ALIGNED
- var = 1.
- END SUBROUTINE foo
-END MODULE test_mod
Index: flang/lib/Lower/Bridge.cpp
===================================================================
--- flang/lib/Lower/Bridge.cpp
+++ flang/lib/Lower/Bridge.cpp
@@ -313,12 +313,7 @@
[&](Fortran::lower::pft::FunctionLikeUnit &f) { lowerFunc(f); },
[&](Fortran::lower::pft::ModuleLikeUnit &m) { lowerMod(m); },
[&](Fortran::lower::pft::BlockDataUnit &b) {},
- [&](Fortran::lower::pft::CompilerDirectiveUnit &d) {
- setCurrentPosition(
- d.get<Fortran::parser::CompilerDirective>().source);
- mlir::emitWarning(toLocation(),
- "ignoring all compiler directives");
- },
+ [&](Fortran::lower::pft::CompilerDirectiveUnit &d) {},
},
u);
}
@@ -2003,7 +1998,7 @@
}
void genFIR(const Fortran::parser::CompilerDirective &) {
- mlir::emitWarning(toLocation(), "ignoring all compiler directives");
+ // TODO
}
void genFIR(const Fortran::parser::OpenACCConstruct &acc) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148365.513709.patch
Type: text/x-patch
Size: 1556 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230414/5f728a15/attachment.bin>
More information about the flang-commits
mailing list