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

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 23 12:24:36 PDT 2021


dblaikie added inline comments.


================
Comment at: llvm/lib/Transforms/Coroutines/CoroFrame.cpp:894
+                                FrameDataInfo &FrameData) {
+  if (!llvm::count_if(F.getParent()->debug_compile_units(), [](auto *Iter) {
+        return dwarf::isCPlusPlus(
----------------
lxfind wrote:
> Does this mean that if there is any C++ files, we don't build debug info?
aside, I guess this should probably be using `llvm::none_of` - it'll shortcircuit (won't keep testing every CU if it finds one that is C++) and is more clear about the semantic goal of the test compared to the !count current phrasing.

But also: Why is the code searching all the CUs? Wouldn't it be better to test the CU of the Function being passed in only? Then this code won't behave differently under LTO?


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

https://reviews.llvm.org/D99179



More information about the llvm-commits mailing list