This revision was automatically updated to reflect the committed changes.
Closed by commit rG878d96011acc: [clang][CodeGen] Handle throw expression in
conditional operator constant… (authored by tambre, committed by rsmith).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
tambre marked an inline comment as done.
tambre added a comment.
Updated the comment.
Please commit this for me, as I lack commit privileges.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77502/new/
https://reviews.llvm.org/D77502
tambre updated this revision to Diff 255607.
tambre marked an inline comment as done.
tambre added a comment.
Update comment
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77502/new/
https://reviews.llvm.org/D77502
Files:
rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.
Looks good (with the comment suitably tweaked). Thanks!
Comment at: clang/lib/CodeGen/CGExpr.cpp:4334
incrementProfileCounter(expr);
+ // If a throw expression
tambre added inline comments.
Comment at: clang/lib/CodeGen/CGExpr.cpp:4337
+EmitCXXThrowExpr(ThrowExpr);
+return EmitLValue(dead);
+ }
rsmith wrote:
> The IR we emit for the dead operand is unreachable; it's a bit wasteful to
> generate it
tambre updated this revision to Diff 255275.
tambre marked 4 inline comments as done.
tambre added a comment.
Emit undef lvalue, add throw CHECK to test
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77502/new/
https://reviews.llvm.org/D77502
rsmith added inline comments.
Comment at: clang/lib/CodeGen/CGExpr.cpp:4337
+EmitCXXThrowExpr(ThrowExpr);
+return EmitLValue(dead);
+ }
The IR we emit for the dead operand is unreachable; it's a bit wasteful to
generate it here and
tambre updated this revision to Diff 255175.
tambre added a comment.
Fix formatting
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77502/new/
https://reviews.llvm.org/D77502
Files:
clang/lib/CodeGen/CGExpr.cpp
tambre created this revision.
tambre added a reviewer: rsmith.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
tambre edited the summary of this revision.
We're smart and do constant folding when emitting conditional operators.
Thus we emit the live value as a lvalue. This