diff options
author | Timm Bäder <tbaeder@redhat.com> | 2022-11-04 07:43:34 +0100 |
---|---|---|
committer | Timm Bäder <tbaeder@redhat.com> | 2022-11-30 10:37:57 +0100 |
commit | 7c215a457178174187cb975e6ee7d96105ea0ef8 (patch) | |
tree | 9f6ca1f320f0ecefe0582dd49414b2c6111b2a87 /flang/lib/Frontend/CompilerInvocation.cpp | |
parent | 099997540f45a50f1bfb1da85cd222e3509b87cb (diff) | |
download | llvm-7c215a457178174187cb975e6ee7d96105ea0ef8.zip llvm-7c215a457178174187cb975e6ee7d96105ea0ef8.tar.gz llvm-7c215a457178174187cb975e6ee7d96105ea0ef8.tar.bz2 |
[clang][Interp] Explicitly handle RVO Pointer
The calling convention is:
[RVO pointer]
[instance pointer]
[... args ...]
We handle the instance pointer ourselves, BUT for the RVO pointer, we
just assumed in visitReturnStmt() that it is on top of the stack. Which
isn't true if there are other args present (and a this pointer, maybe).
Fix this by recording the RVO pointer explicitly when creating an
InterpFrame, just like we do with the instance/This pointer.
There is already a "RVOAndParams()" test in test/AST/Inter/records.cpp,
that was supposed to test this, however, it didn't trigger any
problematic behavior because the parameter and the return value have the
same type.
Differential Revision: https://reviews.llvm.org/D137392
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions