diff options
author | Nikita Popov <npopov@redhat.com> | 2021-12-17 16:12:07 +0100 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2021-12-17 16:13:28 +0100 |
commit | 9e451467217be1325e95eca60bad7924d23e4fe4 (patch) | |
tree | 2a42f95f2f765f5f6f2056ca8f82515b23a3e00b /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 12873d1a670b4a82b5853dabc8b6ea4d300759af (diff) | |
download | llvm-9e451467217be1325e95eca60bad7924d23e4fe4.zip llvm-9e451467217be1325e95eca60bad7924d23e4fe4.tar.gz llvm-9e451467217be1325e95eca60bad7924d23e4fe4.tar.bz2 |
[CodeGen] Fix element type for sret argument
Fix a mistake in 9bf917394eba3ba4df77cc17690c6d04f4e9d57f: sret
arguments use ConvertType, not ConvertTypeForMem, see the handling
in CodeGenTypes::GetFunctionType().
This fixes fp-matrix-pragma.c on s390x.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 91deeb6..4c488bc 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -1070,7 +1070,7 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, auto AI = CurFn->arg_begin(); if (CurFnInfo->getReturnInfo().isSRetAfterThis()) ++AI; - ReturnValue = Address(&*AI, ConvertTypeForMem(RetTy), + ReturnValue = Address(&*AI, ConvertType(RetTy), CurFnInfo->getReturnInfo().getIndirectAlign()); if (!CurFnInfo->getReturnInfo().getIndirectByVal()) { ReturnValuePointer = |