[NFC] Use GlobalObject::setAlignment that takes an Align in BitcodeReader
This commit is contained in:
@@ -3868,7 +3868,8 @@ Error BitcodeReader::parseGlobalVarRecord(ArrayRef<uint64_t> Record) {
|
||||
GlobalVariable *NewGV =
|
||||
new GlobalVariable(*TheModule, Ty, isConstant, Linkage, nullptr, Name,
|
||||
nullptr, TLM, AddressSpace, ExternallyInitialized);
|
||||
NewGV->setAlignment(Alignment);
|
||||
if (Alignment)
|
||||
NewGV->setAlignment(*Alignment);
|
||||
if (!Section.empty())
|
||||
NewGV->setSection(Section);
|
||||
NewGV->setVisibility(Visibility);
|
||||
@@ -4027,7 +4028,8 @@ Error BitcodeReader::parseFunctionRecord(ArrayRef<uint64_t> Record) {
|
||||
MaybeAlign Alignment;
|
||||
if (Error Err = parseAlignmentValue(Record[5], Alignment))
|
||||
return Err;
|
||||
Func->setAlignment(Alignment);
|
||||
if (Alignment)
|
||||
Func->setAlignment(*Alignment);
|
||||
if (Record[6]) {
|
||||
if (Record[6] - 1 >= SectionTable.size())
|
||||
return error("Invalid ID");
|
||||
|
||||
Reference in New Issue
Block a user