@@ -117,12 +117,13 @@ mlir::LLVM::DIModuleAttr AddDebugInfoPass::getOrCreateModuleAttr(
117
117
mlir::LLVM::DIScopeAttr scope, unsigned line, bool decl) {
118
118
mlir::MLIRContext *context = &getContext ();
119
119
mlir::LLVM::DIModuleAttr modAttr;
120
- if (auto iter{moduleMap.find (name)}; iter != moduleMap.end ())
120
+ if (auto iter{moduleMap.find (name)}; iter != moduleMap.end ()) {
121
121
modAttr = iter->getValue ();
122
- else {
122
+ } else {
123
123
modAttr = mlir::LLVM::DIModuleAttr::get (
124
124
context, fileAttr, scope, mlir::StringAttr::get (context, name),
125
- mlir::StringAttr (), mlir::StringAttr (), mlir::StringAttr (), line, decl);
125
+ /* configMacros */ mlir::StringAttr (), /* includePath */ mlir::StringAttr (),
126
+ /* apinotes */ mlir::StringAttr (), line, decl);
126
127
moduleMap[name] = modAttr;
127
128
}
128
129
return modAttr;
@@ -136,7 +137,7 @@ void AddDebugInfoPass::handleGlobalOp(fir::GlobalOp globalOp,
136
137
fir::DebugTypeGenerator typeGen (module );
137
138
mlir::OpBuilder builder (context);
138
139
139
- auto result = fir::NameUniquer::deconstruct (globalOp.getSymName ());
140
+ std::pair result = fir::NameUniquer::deconstruct (globalOp.getSymName ());
140
141
if (result.first != fir::NameUniquer::NameKind::VARIABLE)
141
142
return ;
142
143
@@ -161,7 +162,7 @@ void AddDebugInfoPass::handleGlobalOp(fir::GlobalOp globalOp,
161
162
scope = getOrCreateModuleAttr (result.second .modules [0 ], fileAttr, scope,
162
163
line - 1 , !globalOp.isInitialized ());
163
164
164
- auto diType = typeGen.convertType (globalOp.getType (), fileAttr, scope,
165
+ mlir::LLVM::DITypeAttr diType = typeGen.convertType (globalOp.getType (), fileAttr, scope,
165
166
globalOp.getLoc ());
166
167
auto gvAttr = mlir::LLVM::DIGlobalVariableAttr::get (
167
168
context, scope, mlir::StringAttr::get (context, result.second .name ),
0 commit comments