[PATCH] D99179: [RFC] [Coroutines] Enable printing coroutine frame in debugger if program is compiled with -g

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 11 23:54:20 PDT 2021


ChuanqiXu added inline comments.


================
Comment at: llvm/lib/Transforms/Coroutines/CoroFrame.cpp:843
+    SmallVector<Metadata *, 16> Elements;
+    for (unsigned I = 0; I < StructTy->getNumElements(); I++) {
+      DIType *DITy = solveDIType(Builder, StructTy->getElementType(I), Layout,
----------------
aprantl wrote:
> could this be written as a range-based for?
Since we need to use the index `I` for StructLayout later, I choose the index based for. If we use range-based for, we may need to edit the StructLayout module.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99179/new/

https://reviews.llvm.org/D99179



More information about the llvm-commits mailing list