Skip to content

[flang][NFC] Fix typo getFuncElementAttrName -> getFuncElementalAttrName #95998

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

clementval
Copy link
Contributor

Fix type in the getter for the attribute name

@llvmbot llvmbot added flang Flang issues not falling into any other category flang:fir-hlfir labels Jun 18, 2024
@llvmbot
Copy link
Member

llvmbot commented Jun 18, 2024

@llvm/pr-subscribers-flang-fir-hlfir

Author: Valentin Clement (バレンタイン クレメン) (clementval)

Changes

Fix type in the getter for the attribute name


Full diff: https://github.com/llvm/llvm-project/pull/95998.diff

2 Files Affected:

  • (modified) flang/include/flang/Optimizer/Dialect/FIROpsSupport.h (+1-1)
  • (modified) flang/lib/Lower/CallInterface.cpp (+1-1)
diff --git a/flang/include/flang/Optimizer/Dialect/FIROpsSupport.h b/flang/include/flang/Optimizer/Dialect/FIROpsSupport.h
index 116c1dfea51b4..50e18792a167a 100644
--- a/flang/include/flang/Optimizer/Dialect/FIROpsSupport.h
+++ b/flang/include/flang/Optimizer/Dialect/FIROpsSupport.h
@@ -152,7 +152,7 @@ static constexpr llvm::StringRef getFuncPureAttrName() {
   return "fir.func_pure";
 }
 
-static constexpr llvm::StringRef getFuncElementAttrName() {
+static constexpr llvm::StringRef getFuncElementalAttrName() {
   return "fir.func_elemental";
 }
 
diff --git a/flang/lib/Lower/CallInterface.cpp b/flang/lib/Lower/CallInterface.cpp
index 75a86273250d1..30f985804d2ae 100644
--- a/flang/lib/Lower/CallInterface.cpp
+++ b/flang/lib/Lower/CallInterface.cpp
@@ -615,7 +615,7 @@ static void addSymbolAttribute(mlir::func::FuncOp func,
     func->setAttr(fir::getFuncPureAttrName(),
                   mlir::UnitAttr::get(&mlirContext));
   if (IsElementalProcedure(sym))
-    func->setAttr(fir::getFuncElementAttrName(),
+    func->setAttr(fir::getFuncElementalAttrName(),
                   mlir::UnitAttr::get(&mlirContext));
   if (sym.attrs().test(Fortran::semantics::Attr::RECURSIVE))
     func->setAttr(fir::getFuncRecursiveAttrName(),

@clementval clementval merged commit 625fc4b into llvm:main Jun 18, 2024
8 of 9 checks passed
@clementval clementval deleted the func_attr_elemental branch June 18, 2024 22:03
AlexisPerry pushed a commit to llvm-project-tlp/llvm-project that referenced this pull request Jul 9, 2024
…ame (llvm#95998)

Fix type in the getter for the attribute name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:fir-hlfir flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants