aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorTimm Bäder <tbaeder@redhat.com>2022-11-04 07:43:34 +0100
committerTimm Bäder <tbaeder@redhat.com>2022-11-30 10:37:57 +0100
commit7c215a457178174187cb975e6ee7d96105ea0ef8 (patch)
tree9f6ca1f320f0ecefe0582dd49414b2c6111b2a87 /flang/lib/Frontend/CompilerInvocation.cpp
parent099997540f45a50f1bfb1da85cd222e3509b87cb (diff)
downloadllvm-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