[Mlir-commits] [mlir] [mlir] Add support for DIGlobalVariable and DIGlobalVariableExpression (PR #73367)
Christian Ulmann
llvmlistbot at llvm.org
Wed Nov 29 00:53:41 PST 2023
================
@@ -281,8 +293,31 @@ Location DebugImporter::translateLoc(llvm::DILocation *loc) {
return result;
}
+DIExpressionAttr DebugImporter::translateExpression(llvm::DIExpression *node) {
+ SmallVector<DIExpressionElemAttr> ops;
+
+ // Begin processing the operations
+ for (const auto &op : node->expr_ops()) {
+ SmallVector<uint64_t> operands;
+ operands.reserve(op.getNumArgs());
+ for (const auto &i : llvm::seq(op.getNumArgs())) {
+ operands.push_back(op.getArg(i));
+ }
----------------
Dinistro wrote:
Nit: Drop unnecessary braces
https://github.com/llvm/llvm-project/pull/73367
More information about the Mlir-commits
mailing list