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

Scott Manley via flang-commits flang-commits at lists.llvm.org
Tue Sep 1 09:01:46 PDT 2026


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

change getLinkName to use getLinkage to fix build after #215369

>From 4ce3dfd3add9833d34e442e45ba53bbb546c6d84 Mon Sep 17 00:00:00 2001
From: Scott Manley <scmanley at nvidia.com>
Date: Tue, 1 Sep 2026 09:00:00 -0700
Subject: [PATCH] [flang][fir] fix build

change getLinkName to use getLinkage to fix build
---
 flang/lib/Optimizer/Transforms/AddDebugInfo.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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());



More information about the flang-commits mailing list