[PATCH] D99179: [RFC] [Coroutines] Enable printing coroutine frame in debugger if program is compiled with -g
    Adrian Prantl via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Apr  8 09:36:06 PDT 2021
    
    
  
aprantl added a comment.
Given everything that was said, it looks like this approach is the best one, even if it is unusual.
================
Comment at: llvm/lib/Transforms/Coroutines/CoroFrame.cpp:1026
+    SubProgram->replaceOperandWith(
+        7, (MDTuple::get(F.getContext(), RetainedNodesVec)));
+  }
----------------
I think we might be able to get away without adding the new variables to RetainedNodes. IIRC, the RetainedNodes is there to guarantee that variables that are optimized out still make it into the debug info even if no dbg.value points to them. But for artificial variables like these, there is probably no point in preserving them because they are only interesting if they actually have a value.
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99179/new/
https://reviews.llvm.org/D99179
    
    
More information about the llvm-commits
mailing list