[CodeGen] Avoid nullptr arg to CreateStructGEP (NFC)
For now just make the getPointerElementType() explicit.
This commit is contained in:
parent
9e225a2a71
commit
a0ea367562
|
@ -3437,7 +3437,8 @@ void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI,
|
|||
--EI;
|
||||
llvm::Value *ArgStruct = &*EI;
|
||||
llvm::Value *SRet = Builder.CreateStructGEP(
|
||||
nullptr, ArgStruct, RetAI.getInAllocaFieldIndex());
|
||||
EI->getType()->getPointerElementType(), ArgStruct,
|
||||
RetAI.getInAllocaFieldIndex());
|
||||
llvm::Type *Ty =
|
||||
cast<llvm::GetElementPtrInst>(SRet)->getResultElementType();
|
||||
RV = Builder.CreateAlignedLoad(Ty, SRet, getPointerAlign(), "sret");
|
||||
|
|
Loading…
Reference in New Issue