[flang-commits] [flang] [flang][fir] fix build (PR #220283)

via flang-commits flang-commits at lists.llvm.org
Tue Sep 1 09:02:28 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

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

Author: Scott Manley (rscottmanley)

<details>
<summary>Changes</summary>

change getLinkName to use getLinkage to fix build after #<!-- -->215369

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


1 Files Affected:

- (modified) flang/lib/Optimizer/Transforms/AddDebugInfo.cpp (+1-1) 


``````````diff
diff --git a/flang/lib/Optimizer/Transforms/AddDebugInfo.cpp b/flang/lib/Optimizer/Transforms/AddDebugInfo.cpp
index 0847b4d5d3b89..f211218912cc0 100644
--- a/flang/lib/Optimizer/Transforms/AddDebugInfo.cpp
+++ b/flang/lib/Optimizer/Transforms/AddDebugInfo.cpp
@@ -561,7 +561,7 @@ void AddDebugInfoPass::handleGlobalOp(fir::GlobalOp globalOp,
   // declared inside a procedure, is not visible outside this compilation unit.
   // It also needs no linkage name because there is no external symbol for a
   // debugger to match it against.
-  const bool isLocalToUnit = globalOp.getLinkName() == "internal";
+  const bool isLocalToUnit = globalOp.getLinkage() == fir::LinkageEnum::Internal;
   mlir::StringAttr linkageName =
       isLocalToUnit ? mlir::StringAttr()
                     : mlir::StringAttr::get(context, globalOp.getName());

``````````

</details>


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


More information about the flang-commits mailing list