[PATCH] IR: Move the complex address expression field out of DIVariable and into an extra argument of the dbg.declare/dbg.value intrinsics.
aprantl at apple.com
Mon Sep 29 16:13:46 PDT 2014
I'll fix these two things up before committing. Do you have any other comments that should block committing?
Comment at: include/llvm/IR/DebugInfo.h:756
@@ +755,3 @@
+ unsigned N = DbgNode->getNumOperands();
+ return N > 0 ? N-1 : N;
> When would this ever be zero? Can we just assert that it's not?
> (I assume it should be at least 2 - since the expression has to contain some operations, presumably?)
I believe this may be a leftover from when DIExpression did not have its own TAG. We should just assert that N>0.
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1394
@@ -1390,1 +1393,3 @@
+ DIExpression NoExpr;
+ ConcreteVariables.push_back(make_unique<DbgVariable>(DV, NoExpr, this));
> I'd probably just create a DIExpression() inline rather than having a separate variable (when I see it written as a separate variable I wonder if it's an unused out parameter or somesuch). Up to you.
> Or consider providing a different ctor for abstract variables that just doesn't take a DIExpression anyway? Not sure.
More information about the llvm-commits