[Mlir-commits] [mlir] [mlir] Add support for DIGlobalVariable and DIGlobalVariableExpression (PR #73367)

Christian Ulmann llvmlistbot at llvm.org
Mon Nov 27 23:03:12 PST 2023


================
@@ -281,6 +291,29 @@ llvm::DILocation *DebugTranslation::translateLoc(Location loc,
   return translateLoc(loc, scope, /*inlinedAt=*/nullptr);
 }
 
+// Translate the given DWARF expression metadata to to LLVM.
+llvm::DIExpression *
+DebugTranslation::translateExpression(LLVM::DIExpressionAttr attr) {
+  if (attr) {
----------------
Dinistro wrote:

Nit: Can you reverse the condition and early return in the degenerate case? This avoids indention this entire body. 

https://github.com/llvm/llvm-project/pull/73367


More information about the Mlir-commits mailing list