[flang-commits] [flang] [flang][debug] Add support for common blocks. (PR #112398)
via flang-commits
flang-commits at lists.llvm.org
Tue Jan 28 07:15:13 PST 2025
================
@@ -2994,11 +2994,10 @@ struct GlobalOpConversion : public fir::FIROpConversion<fir::GlobalOp> {
llvm::SmallVector<mlir::Attribute> dbgExprs;
if (auto fusedLoc = mlir::dyn_cast<mlir::FusedLoc>(global.getLoc())) {
- if (auto gvAttr =
- mlir::dyn_cast_or_null<mlir::LLVM::DIGlobalVariableAttr>(
- fusedLoc.getMetadata())) {
- dbgExprs.push_back(mlir::LLVM::DIGlobalVariableExpressionAttr::get(
- global.getContext(), gvAttr, mlir::LLVM::DIExpressionAttr()));
+ if (auto gvExprAttr = mlir::dyn_cast_if_present<mlir::ArrayAttr>(
+ fusedLoc.getMetadata())) {
+ for (auto attr : gvExprAttr.getAsRange<mlir::Attribute>())
----------------
jeanPerier wrote:
Thanks for the change and link.
https://github.com/llvm/llvm-project/pull/112398
More information about the flang-commits
mailing list