diff options
author | Nikita Popov <npopov@redhat.com> | 2022-03-17 15:41:50 +0100 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2022-03-17 16:36:14 +0100 |
commit | 6c0af92612d0730a039226d67cfa08f4d6db5be9 (patch) | |
tree | 6458a2ad681f95ee708d894567ee9bd685eadea3 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 7ed1abd4a6c1fd506423723932ca7dc70efc5a99 (diff) | |
download | llvm-6c0af92612d0730a039226d67cfa08f4d6db5be9.zip llvm-6c0af92612d0730a039226d67cfa08f4d6db5be9.tar.gz llvm-6c0af92612d0730a039226d67cfa08f4d6db5be9.tar.bz2 |
[CodeGen] Avoid some pointer element type accesses
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 50ad336..dc9bc78 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -1104,7 +1104,7 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, llvm::Function::arg_iterator EI = CurFn->arg_end(); --EI; llvm::Value *Addr = Builder.CreateStructGEP( - EI->getType()->getPointerElementType(), &*EI, Idx); + CurFnInfo->getArgStruct(), &*EI, Idx); llvm::Type *Ty = cast<llvm::GetElementPtrInst>(Addr)->getResultElementType(); ReturnValuePointer = Address(Addr, Ty, getPointerAlign()); |