@@ -148,7 +148,7 @@ void AddDebugInfoPass::handleGlobalOp(fir::GlobalOp globalOp,
148
148
// of a corresponding module body).
149
149
// But in practice, compilers use declaration attribute with a module in cases
150
150
// where module was defined in another source file (only being used in this
151
- // one). The hasInitializationBody () seems to provide the right information
151
+ // one). The isInitialized () seems to provide the right information
152
152
// but inverted. It is true where module is actually defined but false where
153
153
// it is used.
154
154
// FIXME: Currently we don't have the line number on which a module was
@@ -159,15 +159,15 @@ void AddDebugInfoPass::handleGlobalOp(fir::GlobalOp globalOp,
159
159
return ;
160
160
161
161
scope = getOrCreateModuleAttr (result.second .modules [0 ], fileAttr, scope,
162
- line - 1 , !globalOp.hasInitializationBody ());
162
+ line - 1 , !globalOp.isInitialized ());
163
163
164
164
auto diType = typeGen.convertType (globalOp.getType (), fileAttr, scope,
165
165
globalOp.getLoc ());
166
166
auto gvAttr = mlir::LLVM::DIGlobalVariableAttr::get (
167
167
context, scope, mlir::StringAttr::get (context, result.second .name ),
168
168
mlir::StringAttr::get (context, globalOp.getName ()), fileAttr, line,
169
169
diType, /* isLocalToUnit*/ false ,
170
- /* isDefinition*/ globalOp.hasInitializationBody (), /* alignInBits*/ 0 );
170
+ /* isDefinition*/ globalOp.isInitialized (), /* alignInBits*/ 0 );
171
171
globalOp->setLoc (builder.getFusedLoc ({globalOp->getLoc ()}, gvAttr));
172
172
}
173
173
0 commit comments