[PATCH] D102412: [coro] Preserve scope line for compiler generated functions

Dave Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 17 17:48:47 PDT 2021


kastiglione added inline comments.


================
Comment at: llvm/lib/Transforms/Coroutines/CoroSplit.cpp:861
       if (auto DL = ActiveSuspend->getDebugLoc())
-        SP->setScopeLine(DL->getLine());
+        if (SP->getScopeLine() != 0)
+          SP->setScopeLine(DL->getLine());
----------------
aprantl wrote:
> kastiglione wrote:
> > @aprantl do you think it's worth checking flags as well? I noticed in the cases where `ScopeLine` was zero, that flags was `FlagArtificial`. Should this logic check that too?
> Would `SP->getFile() == DL->getFile()` also work as a condition? That would maybe be the closest to what we really want to check. Otherwise checking for 0 sounds good to me.
That condition works too.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102412



More information about the llvm-commits mailing list