diff options
| author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-12-04 09:59:57 +0000 |
|---|---|---|
| committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-12-04 09:59:57 +0000 |
| commit | 76aef2149440afb75620bd4a3ca824ef0b968305 (patch) | |
| tree | 5bc388d1c4b4f0afcace3497d742222f627c858b /lib/CodeGen/CodeGenFunction.cpp | |
| parent | 089cd19a554a9d37d89e674a65e095646104d768 (diff) | |
| download | clang-76aef2149440afb75620bd4a3ca824ef0b968305.tar.gz clang-76aef2149440afb75620bd4a3ca824ef0b968305.tar.bz2 clang-76aef2149440afb75620bd4a3ca824ef0b968305.tar.xz | |
[SystemZ] Fix handling of pass-by-pointer arguments
I'd misunderstood getIndirect() to mean that the argument should be passed
as a pointer at the ABI level, with the ByVal argument choosing caller-copy
semantics over no-caller-copy (callee-copy-on-write) semantics. But
getIndirect(x) actually means that x is passed by pointer at the IR
level but (at least on all other targets I looked at) directly at the
ABI level. getIndirect(x, false) selects a pointer to a caller-made
copy, which is what SystemZ was aiming for.
This fixes a miscompilation of c-index-test. Structure arguments were being
passed by pointer, but no copy was being made, so a write in the callee
stomped over a caller's local variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196370 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions
