Expression in selector were raising an error. In some
cases expression can be found in selector. This patch
updates the code to accept expression and adds a lowering
test.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
flang/lib/Lower/Bridge.cpp | ||
---|---|---|
2207 | Could the expression generate a temp that requires deallocation? |
To add some detail - if an expression includes a function call that returns memory, the memory needs to be freed. And since the construct could have an early exit, the normal exit cleanup might not be invoked. That can be accommodated by immediately finalizing stmtCtx.
We can delay dealing with rare early-exit cases until we have general code for handling them, which should be fairly soon. So this code is ok as is for now.
flang/lib/Lower/Bridge.cpp | ||
---|---|---|
2207 | There is likely some cases where we need it. Since creation of polymorphic temporary is currently a TODO let's do it at the same time. |
Could the expression generate a temp that requires deallocation?