GorNishanov added a comment.

Looks good. Make sure to run the tests in release and debug mode.
On my box, these three test failed in release mode.

  Clang :: CodeGenCoroutines/coro-await-resume-eh.cpp
  Clang :: CodeGenCoroutines/coro-promise-dtor.cpp
  Clang :: CodeGenCoroutines/coro-unhandled-exception.cpp

There is a small difference in friendly names emission in release mode



================
Comment at: lib/CodeGen/CGCoroutine.cpp:220
   CGF.EmitBlock(ReadyBlock);
+  CXXTryStmt *TryStmt = nullptr;
+  if (Coro.ExceptionHandler && Kind == AwaitKind::Init) {
----------------
I suggest to check whether await_resume expression is noexcept and omit 
emission of all of the goo. Most of the time the await_ready for 
initial_suspend will be noexcept and thus we would not need to emit extra stuff.



Repository:
  rC Clang

https://reviews.llvm.org/D45860



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to