[Mlir-commits] [mlir] [mlir] Add support for DIGlobalVariable and DIGlobalVariableExpression (PR #73367)
Christian Ulmann
llvmlistbot at llvm.org
Mon Nov 27 09:03:38 PST 2023
================
@@ -782,6 +782,22 @@ LogicalResult ModuleTranslation::convertGlobals() {
var->setVisibility(convertVisibilityToLLVM(op.getVisibility_()));
globalsMapping.try_emplace(op, var);
+
+ // Add debug information if present
+ if (op.getDbgExpr()) {
+ auto *const globalExpr = debugTranslation->translate(op.getDbgExpr());
+ const auto *globalVar = globalExpr->getVariable();
----------------
Dinistro wrote:
Nit: Can you avoid `auto` here, and right above?
https://github.com/llvm/llvm-project/pull/73367
More information about the Mlir-commits
mailing list