[flang-commits] [flang] [mlir] [mlir][debug] Allow multiple DIGlobalVariableExpression on globals. (PR #111981)
Tobias Gysi via flang-commits
flang-commits at lists.llvm.org
Fri Oct 11 11:21:29 PDT 2024
================
@@ -914,14 +914,16 @@ LogicalResult ModuleImport::convertGlobal(llvm::GlobalVariable *globalVar) {
// Get the global expression associated with this global variable and convert
// it.
- DIGlobalVariableExpressionAttr globalExpressionAttr;
+ SmallVector<Attribute> globalExpressionAttrs;
SmallVector<llvm::DIGlobalVariableExpression *> globalExpressions;
globalVar->getDebugInfo(globalExpressions);
// There should only be a single global expression.
- if (!globalExpressions.empty())
- globalExpressionAttr =
- debugImporter->translateGlobalVariableExpression(globalExpressions[0]);
+ for (auto expr : globalExpressions) {
----------------
gysit wrote:
```suggestion
for (Attribute expr : globalExpressions) {
```
nit:
https://github.com/llvm/llvm-project/pull/111981
More information about the flang-commits
mailing list