forked from OSchip/llvm-project
parent
93ca36d756
commit
f7caf3cac8
|
@ -4132,11 +4132,12 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
|
|||
auto scalarAlign = CGM.getDataLayout().getPrefTypeAlignment(scalarType);
|
||||
|
||||
// Materialize to a temporary.
|
||||
addr = CreateTempAlloca(RV.getScalarVal()->getType(),
|
||||
CharUnits::fromQuantity(std::max(
|
||||
layout->getAlignment(), scalarAlign)),
|
||||
"tmp",
|
||||
/*ArraySize=*/nullptr, &AllocaAddr);
|
||||
addr = CreateTempAlloca(
|
||||
RV.getScalarVal()->getType(),
|
||||
CharUnits::fromQuantity(std::max(
|
||||
(unsigned)layout->getAlignment().value(), scalarAlign)),
|
||||
"tmp",
|
||||
/*ArraySize=*/nullptr, &AllocaAddr);
|
||||
tempSize = EmitLifetimeStart(scalarSize, AllocaAddr.getPointer());
|
||||
|
||||
Builder.CreateStore(RV.getScalarVal(), addr);
|
||||
|
|
Loading…
Reference in New Issue