[Mlir-commits] [mlir] [mlir][debug] Support DICommonBlock. (PR #111706)
Tobias Gysi
llvmlistbot at llvm.org
Wed Oct 9 13:08:32 PDT 2024
================
@@ -1064,19 +1064,28 @@ LogicalResult ModuleTranslation::convertGlobals() {
// There is no `globals` field in DICompileUnitAttr which can be directly
// assigned to DICompileUnit. We have to build the list by looking at the
// dbgExpr of all the GlobalOps. The scope of the variable is used to get
- // the DICompileUnit in which to add it. But for the languages that
- // support modules, the scope hierarchy can be
- // variable -> module -> compile unit
- // If a variable scope points to the module then we use the scope of the
- // module to get the compile unit.
- // Global variables are also used for things like static local variables
- // in C and local variables with the save attribute in Fortran. The scope
- // of the variable is the parent function. We use the compile unit of the
- // parent function in this case.
+ // the DICompileUnit in which to add it.
+ // But there are cases where the scope of the global points does not
+ // directly point to the DICompileUnit and we have to do a bit more work
----------------
gysit wrote:
```suggestion
// But there are cases where the scope of a global does not
// directly point to the DICompileUnit and we have to do a bit more work
```
https://github.com/llvm/llvm-project/pull/111706
More information about the Mlir-commits
mailing list