[flang-commits] [flang] [Flang] Add `INLINEALWAYS` Compiler Directive (PR #192674)

Eugene Epshteyn via flang-commits flang-commits at lists.llvm.org
Fri Apr 24 11:58:31 PDT 2026


================
@@ -3557,6 +3563,18 @@ class FirConverter : public Fortran::lower::AbstractConverter {
       e->dirs.push_back(&dir);
   }
 
+  void markCurrentFuncAsAlwaysInline(
+      const Fortran::parser::CompilerDirective::InlineAlways &dir) {
+    mlir::func::FuncOp func = builder->getFunction();
+    if (currentFunctionUnit && !currentFunctionUnit->isMainProgram()) {
+      const std::string symName =
+          currentFunctionUnit->getSubprogramSymbol().name().ToString();
+      if (dir.v->ToString() == symName) {
----------------
eugeneepshteyn wrote:

Consider `dir.v.value().ToString()` that does the presence check.

https://github.com/llvm/llvm-project/pull/192674


More information about the flang-commits mailing list