[Alignment][NFC] Convert AllocaInst to MaybeAlign

Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Reviewed By: courbet

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69301
This commit is contained in:
Guillaume Chatelet
2019-10-25 22:26:23 +02:00
parent 03de2f84fc
commit e8a0a0904b
8 changed files with 39 additions and 39 deletions

View File

@@ -4761,7 +4761,7 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
const DataLayout &DL = TheModule->getDataLayout();
unsigned AS = DL.getAllocaAddrSpace();
AllocaInst *AI = new AllocaInst(Ty, AS, Size, Align ? Align->value() : 0);
AllocaInst *AI = new AllocaInst(Ty, AS, Size, Align);
AI->setUsedWithInAlloca(InAlloca);
AI->setSwiftError(SwiftError);
I = AI;