[PATCH] D46032: [MIR] Add support for debug metadata for fixed stack objects
Puyan Lotfi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 24 18:13:27 PDT 2018
plotfi added inline comments.
================
Comment at: include/llvm/CodeGen/MachineFunction.h:352
const DIExpression *Expr;
- unsigned Slot;
+ int Slot;
const DILocation *Loc;
----------------
Why the change in type here?
================
Comment at: lib/CodeGen/MIRPrinter.cpp:277
+ }
+}
----------------
Could this be cleaned up? Something like:
```
SmallVector<T, 3> DebugValues = { Object.DebugVar.Value, Object.DebugExpr.Value, Object.DebugLoc.Value };
SmallVector<T, 3> DebugVars = { DebugVar.Var, DebugVar.Expr, DebugVar.Loc };
for (unsigned i = 0; i < DebugValues.size(); ++i) {
raw_string_ostream StrOS(DebugValues[i]);
DebugVars[i]->printAsOperand(StrOS, MST);
}
```
https://reviews.llvm.org/D46032
More information about the llvm-commits
mailing list