[PATCH] D99693: Update the linkage name of coro-split functions where applicable

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 31 19:04:04 PDT 2021


ChuanqiXu added a comment.

I am curious about the test case for `coro-debug.ll`. The ABI used in this test case is Switch ABI. And this patch still affects it.



================
Comment at: llvm/lib/Transforms/Coroutines/CoroSplit.cpp:866
+    // linkage name and asserts that they are identical.
+    if (!SP->getDeclaration())
+      SP->replaceLinkageName(MDString::get(Context, NewF->getName()));
----------------
aprantl wrote:
> kastiglione wrote:
> > Is `!SP->getDeclaration()` the implicit check for swift but not C++?
> Yes. If you have a top-level C++ coroutine — and I have no idea if that's a thing, you would get the "real" linkage name.
Does this mean the DISubprogram for every C++ coroutine did contain a declaration? May I ask where the constraint is?


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

https://reviews.llvm.org/D99693



More information about the llvm-commits mailing list