diff options
| author | Eric Fiselier <eric@efcs.ca> | 2017-06-15 20:00:54 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2017-06-15 20:00:54 +0000 |
| commit | 461b141a9c8ea67d454bfdaba0d1a2ca6e438227 (patch) | |
| tree | 33994ed6253ac1cc95390f45db4ec88814751843 /clang/lib/CodeGen | |
| parent | 79bda47900a5e5fbb25aed1b3cd83676faaddcfe (diff) | |
| download | bcm5719-llvm-461b141a9c8ea67d454bfdaba0d1a2ca6e438227.tar.gz bcm5719-llvm-461b141a9c8ea67d454bfdaba0d1a2ca6e438227.zip | |
[coroutines] Remove pass-through operator co_await; Replace it with the input expression
Reviewers: GorNishanov, rsmith
Reviewed By: GorNishanov
Differential Revision: https://reviews.llvm.org/D34216
llvm-svn: 305498
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGCoroutine.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/clang/lib/CodeGen/CGCoroutine.cpp b/clang/lib/CodeGen/CGCoroutine.cpp index daefb0edcb4..a65faa602b3 100644 --- a/clang/lib/CodeGen/CGCoroutine.cpp +++ b/clang/lib/CodeGen/CGCoroutine.cpp @@ -160,19 +160,6 @@ static LValueOrRValue emitSuspendExpression(CodeGenFunction &CGF, CGCoroData &Co bool ignoreResult, bool forLValue) { auto *E = S.getCommonExpr(); - // FIXME: rsmith 5/22/2017. Does it still make sense for us to have a - // UO_Coawait at all? As I recall, the only purpose it ever had was to - // represent a dependent co_await expression that couldn't yet be resolved to - // a CoawaitExpr. But now we have (and need!) a separate DependentCoawaitExpr - // node to store unqualified lookup results, it seems that the UnaryOperator - // portion of the representation serves no purpose (and as seen in this patch, - // it's getting in the way). Can we remove it? - - // Skip passthrough operator co_await (present when awaiting on an LValue). - if (auto *UO = dyn_cast<UnaryOperator>(E)) - if (UO->getOpcode() == UO_Coawait) - E = UO->getSubExpr(); - auto Binder = CodeGenFunction::OpaqueValueMappingData::bind(CGF, S.getOpaqueValue(), E); auto UnbindOnExit = llvm::make_scope_exit([&] { Binder.unbind(CGF); }); |

