Skip to content

Commit 6c09ea3

Browse files
committed
[Alignment][NFC] Use Align in MCStreamer::emitValueToAlignment
Differential Revision: https://reviews.llvm.org/D138674
1 parent b9e3f5f commit 6c09ea3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+80
-84
lines changed

bolt/include/bolt/Core/BinarySection.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ class BinarySection {
254254
uint64_t getEndAddress() const { return Address + Size; }
255255
uint64_t getSize() const { return Size; }
256256
uint64_t getInputFileOffset() const { return InputFileOffset; }
257+
Align getAlign() const { return Align(Alignment); }
257258
uint64_t getAlignment() const { return Alignment; }
258259
bool isText() const {
259260
if (isELF())

bolt/lib/Core/BinaryEmitter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ void BinaryEmitter::emitJumpTable(const JumpTable &JT, MCSection *HotSection,
795795
LabelCounts[CurrentLabel] = CurrentLabelCount;
796796
} else {
797797
Streamer.switchSection(JT.Count > 0 ? HotSection : ColdSection);
798-
Streamer.emitValueToAlignment(JT.EntrySize);
798+
Streamer.emitValueToAlignment(Align(JT.EntrySize));
799799
}
800800
MCSymbol *LastLabel = nullptr;
801801
uint64_t Offset = 0;
@@ -815,7 +815,7 @@ void BinaryEmitter::emitJumpTable(const JumpTable &JT, MCSection *HotSection,
815815
Streamer.switchSection(HotSection);
816816
else
817817
Streamer.switchSection(ColdSection);
818-
Streamer.emitValueToAlignment(JT.EntrySize);
818+
Streamer.emitValueToAlignment(Align(JT.EntrySize));
819819
}
820820
// Emit all labels registered at the address of this jump table
821821
// to sync with our global symbol table. We may have two labels
@@ -925,7 +925,7 @@ void BinaryEmitter::emitLSDA(BinaryFunction &BF, const FunctionFragment &FF) {
925925
const uint16_t TTypeAlignment = 4;
926926

927927
// Type tables have to be aligned at 4 bytes.
928-
Streamer.emitValueToAlignment(TTypeAlignment);
928+
Streamer.emitValueToAlignment(Align(TTypeAlignment));
929929

930930
// Emit the LSDA label.
931931
MCSymbol *LSDASymbol = BF.getLSDASymbol(FF.getFragmentNum());

bolt/lib/Core/BinarySection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ void BinarySection::emitAsData(MCStreamer &Streamer,
7474
BC.Ctx->getELFSection(SectionName, getELFType(), getELFFlags());
7575

7676
Streamer.switchSection(ELFSection);
77-
Streamer.emitValueToAlignment(getAlignment());
77+
Streamer.emitValueToAlignment(getAlign());
7878

7979
if (BC.HasRelocations && opts::HotData && isReordered())
8080
Streamer.emitLabel(BC.Ctx->getOrCreateSymbol("__hot_data_start"));

llvm/include/llvm/MC/MCELFStreamer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class MCELFStreamer : public MCObjectStreamer {
7676

7777
void emitIdent(StringRef IdentString) override;
7878

79-
void emitValueToAlignment(unsigned, int64_t, unsigned, unsigned) override;
79+
void emitValueToAlignment(Align, int64_t, unsigned, unsigned) override;
8080

8181
void emitCGProfileEntry(const MCSymbolRefExpr *From,
8282
const MCSymbolRefExpr *To, uint64_t Count) override;

llvm/include/llvm/MC/MCObjectStreamer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class MCObjectStreamer : public MCStreamer {
152152
void emitBundleLock(bool AlignToEnd) override;
153153
void emitBundleUnlock() override;
154154
void emitBytes(StringRef Data) override;
155-
void emitValueToAlignment(unsigned ByteAlignment, int64_t Value = 0,
155+
void emitValueToAlignment(Align Alignment, int64_t Value = 0,
156156
unsigned ValueSize = 1,
157157
unsigned MaxBytesToEmit = 0) override;
158158
void emitCodeAlignment(Align ByteAlignment, const MCSubtargetInfo *STI,

llvm/include/llvm/MC/MCStreamer.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -854,15 +854,14 @@ class MCStreamer {
854854
///
855855
/// This used to implement the .align assembler directive.
856856
///
857-
/// \param ByteAlignment - The alignment to reach. This must be a power of
858-
/// two on some targets.
857+
/// \param Alignment - The alignment to reach.
859858
/// \param Value - The value to use when filling bytes.
860859
/// \param ValueSize - The size of the integer (in bytes) to emit for
861860
/// \p Value. This must match a native machine width.
862861
/// \param MaxBytesToEmit - The maximum numbers of bytes to emit, or 0. If
863862
/// the alignment cannot be reached in this many bytes, no bytes are
864863
/// emitted.
865-
virtual void emitValueToAlignment(unsigned ByteAlignment, int64_t Value = 0,
864+
virtual void emitValueToAlignment(Align Alignment, int64_t Value = 0,
866865
unsigned ValueSize = 1,
867866
unsigned MaxBytesToEmit = 0);
868867

llvm/lib/CodeGen/AsmPrinter/AIXException.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void AIXException::emitExceptionInfoTable(const MCSymbol *LSDA,
6969
const unsigned PointerSize = DL.getPointerSize();
7070

7171
// Add necessary paddings in 64 bit mode.
72-
Asm->OutStreamer->emitValueToAlignment(PointerSize);
72+
Asm->OutStreamer->emitValueToAlignment(Align(PointerSize));
7373

7474
// LSDA location.
7575
Asm->OutStreamer->emitValue(MCSymbolRefExpr::create(LSDA, Asm->OutContext),

llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ template <typename DataT> void Dwarf5AccelTableWriter<DataT>::emit() {
531531
emitOffsets(EntryPool);
532532
emitAbbrevs();
533533
emitData();
534-
Asm->OutStreamer->emitValueToAlignment(4, 0);
534+
Asm->OutStreamer->emitValueToAlignment(Align(4), 0);
535535
Asm->OutStreamer->emitLabel(ContributionEnd);
536536
}
537537

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2837,7 +2837,7 @@ void AsmPrinter::emitAlignment(Align Alignment, const GlobalObject *GV,
28372837
STI = TM.getMCSubtargetInfo();
28382838
OutStreamer->emitCodeAlignment(Alignment, STI, MaxBytesToEmit);
28392839
} else
2840-
OutStreamer->emitValueToAlignment(Alignment.value(), 0, 1, MaxBytesToEmit);
2840+
OutStreamer->emitValueToAlignment(Alignment, 0, 1, MaxBytesToEmit);
28412841
}
28422842

28432843
//===----------------------------------------------------------------------===//

llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ void CodeViewDebug::maybeRecordLocation(const DebugLoc &DL,
560560
}
561561

562562
void CodeViewDebug::emitCodeViewMagicVersion() {
563-
OS.emitValueToAlignment(4);
563+
OS.emitValueToAlignment(Align(4));
564564
OS.AddComment("Debug section magic");
565565
OS.emitInt32(COFF::DEBUG_SECTION_MAGIC);
566566
}
@@ -754,7 +754,7 @@ void CodeViewDebug::emitTypeGlobalHashes() {
754754
// hardcoded to version 0, SHA1.
755755
OS.switchSection(Asm->getObjFileLowering().getCOFFGlobalTypeHashesSection());
756756

757-
OS.emitValueToAlignment(4);
757+
OS.emitValueToAlignment(Align(4));
758758
OS.AddComment("Magic");
759759
OS.emitInt32(COFF::DEBUG_HASHES_SECTION_MAGIC);
760760
OS.AddComment("Section Version");
@@ -3109,7 +3109,7 @@ MCSymbol *CodeViewDebug::beginCVSubsection(DebugSubsectionKind Kind) {
31093109
void CodeViewDebug::endCVSubsection(MCSymbol *EndLabel) {
31103110
OS.emitLabel(EndLabel);
31113111
// Every subsection must be aligned to a 4-byte boundary.
3112-
OS.emitValueToAlignment(4);
3112+
OS.emitValueToAlignment(Align(4));
31133113
}
31143114

31153115
static StringRef getSymbolName(SymbolKind SymKind) {
@@ -3136,7 +3136,7 @@ void CodeViewDebug::endSymbolRecord(MCSymbol *SymEnd) {
31363136
// an extra copy of every symbol record in LLD. This increases object file
31373137
// size by less than 1% in the clang build, and is compatible with the Visual
31383138
// C++ linker.
3139-
OS.emitValueToAlignment(4);
3139+
OS.emitValueToAlignment(Align(4));
31403140
OS.emitLabel(SymEnd);
31413141
}
31423142

llvm/lib/CodeGen/AsmPrinter/WinException.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ void WinException::emitCXXFrameHandler3Table(const MachineFunction *MF) {
736736
// EHFlags & 1 -> Synchronous exceptions only, no async exceptions.
737737
// EHFlags & 2 -> ???
738738
// EHFlags & 4 -> The function is noexcept(true), unwinding can't continue.
739-
OS.emitValueToAlignment(4);
739+
OS.emitValueToAlignment(Align(4));
740740
OS.emitLabel(FuncInfoXData);
741741

742742
AddComment("MagicNumber");
@@ -1010,7 +1010,7 @@ void WinException::emitExceptHandlerTable(const MachineFunction *MF) {
10101010

10111011
// Emit the __ehtable label that we use for llvm.x86.seh.lsda.
10121012
MCSymbol *LSDALabel = Asm->OutContext.getOrCreateLSDASymbol(FLinkageName);
1013-
OS.emitValueToAlignment(4);
1013+
OS.emitValueToAlignment(Align(4));
10141014
OS.emitLabel(LSDALabel);
10151015

10161016
const auto *Per = cast<Function>(F.getPersonalityFn()->stripPointerCasts());

llvm/lib/CodeGen/StackMaps.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ void StackMaps::emitCallsiteEntries(MCStreamer &OS) {
688688
}
689689

690690
// Emit alignment to 8 byte.
691-
OS.emitValueToAlignment(8);
691+
OS.emitValueToAlignment(Align(8));
692692

693693
// Num live-out registers and padding to align to 4 byte.
694694
OS.emitInt16(0);
@@ -700,7 +700,7 @@ void StackMaps::emitCallsiteEntries(MCStreamer &OS) {
700700
OS.emitIntValue(LO.Size, 1);
701701
}
702702
// Emit alignment to 8 byte.
703-
OS.emitValueToAlignment(8);
703+
OS.emitValueToAlignment(Align(8));
704704
}
705705
}
706706

llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ void TargetLoweringObjectFileELF::emitPersonalityValue(
434434
ELF::SHT_PROGBITS, Flags, 0);
435435
unsigned Size = DL.getPointerSize();
436436
Streamer.switchSection(Sec);
437-
Streamer.emitValueToAlignment(DL.getPointerABIAlignment(0).value());
437+
Streamer.emitValueToAlignment(DL.getPointerABIAlignment(0));
438438
Streamer.emitSymbolAttribute(Label, MCSA_ELF_TypeObject);
439439
const MCExpr *E = MCConstantExpr::create(Size, getContext());
440440
Streamer.emitELFSize(Label, E);

llvm/lib/MC/ConstantPools.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void ConstantPool::emitEntries(MCStreamer &Streamer) {
2828
return;
2929
Streamer.emitDataRegion(MCDR_DataRegion);
3030
for (const ConstantPoolEntry &Entry : Entries) {
31-
Streamer.emitValueToAlignment(Entry.Size); // align naturally
31+
Streamer.emitValueToAlignment(Align(Entry.Size)); // align naturally
3232
Streamer.emitLabel(Entry.Label);
3333
Streamer.emitValue(Entry.Value, Entry.Size, Entry.Loc);
3434
}

llvm/lib/MC/MCAsmStreamer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ class MCAsmStreamer final : public MCStreamer {
252252
void emitAlignmentDirective(unsigned ByteAlignment, Optional<int64_t> Value,
253253
unsigned ValueSize, unsigned MaxBytesToEmit);
254254

255-
void emitValueToAlignment(unsigned ByteAlignment, int64_t Value = 0,
255+
void emitValueToAlignment(Align Alignment, int64_t Value = 0,
256256
unsigned ValueSize = 1,
257257
unsigned MaxBytesToEmit = 0) override;
258258

@@ -1482,10 +1482,10 @@ void MCAsmStreamer::emitAlignmentDirective(unsigned ByteAlignment,
14821482
EmitEOL();
14831483
}
14841484

1485-
void MCAsmStreamer::emitValueToAlignment(unsigned ByteAlignment, int64_t Value,
1485+
void MCAsmStreamer::emitValueToAlignment(Align Alignment, int64_t Value,
14861486
unsigned ValueSize,
14871487
unsigned MaxBytesToEmit) {
1488-
emitAlignmentDirective(ByteAlignment, Value, ValueSize, MaxBytesToEmit);
1488+
emitAlignmentDirective(Alignment.value(), Value, ValueSize, MaxBytesToEmit);
14891489
}
14901490

14911491
void MCAsmStreamer::emitCodeAlignment(Align Alignment,

llvm/lib/MC/MCCodeView.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ void CodeViewContext::emitStringTable(MCObjectStreamer &OS) {
185185
InsertedStrTabFragment = true;
186186
}
187187

188-
OS.emitValueToAlignment(4, 0);
188+
OS.emitValueToAlignment(Align(4), 0);
189189

190190
OS.emitLabel(StringEnd);
191191
}
@@ -233,7 +233,7 @@ void CodeViewContext::emitFileChecksums(MCObjectStreamer &OS) {
233233
OS.emitInt8(static_cast<uint8_t>(File.Checksum.size()));
234234
OS.emitInt8(File.ChecksumKind);
235235
OS.emitBytes(toStringRef(File.Checksum));
236-
OS.emitValueToAlignment(4);
236+
OS.emitValueToAlignment(Align(4));
237237
}
238238

239239
OS.emitLabel(FileEnd);

llvm/lib/MC/MCDwarf.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,7 +1686,7 @@ const MCSymbol &FrameEmitterImpl::EmitCIE(const MCDwarfFrameInfo &Frame) {
16861686
InitialCFAOffset = CFAOffset;
16871687

16881688
// Padding
1689-
Streamer.emitValueToAlignment(IsEH ? 4 : MAI->getCodePointerSize());
1689+
Streamer.emitValueToAlignment(Align(IsEH ? 4 : MAI->getCodePointerSize()));
16901690

16911691
Streamer.emitLabel(sectionEnd);
16921692
return *sectionStart;
@@ -1763,8 +1763,8 @@ void FrameEmitterImpl::EmitFDE(const MCSymbol &cieStart,
17631763
// The size of a .eh_frame section has to be a multiple of the alignment
17641764
// since a null CIE is interpreted as the end. Old systems overaligned
17651765
// .eh_frame, so we do too and account for it in the last FDE.
1766-
unsigned Align = LastInSection ? asmInfo->getCodePointerSize() : PCSize;
1767-
Streamer.emitValueToAlignment(Align);
1766+
unsigned Alignment = LastInSection ? asmInfo->getCodePointerSize() : PCSize;
1767+
Streamer.emitValueToAlignment(Align(Alignment));
17681768

17691769
Streamer.emitLabel(fdeEnd);
17701770
}
@@ -1869,7 +1869,7 @@ void MCDwarfFrameEmitter::Emit(MCObjectStreamer &Streamer, MCAsmBackend *MAB,
18691869
if (Frame.CompactUnwindEncoding == 0) continue;
18701870
if (!SectionEmitted) {
18711871
Streamer.switchSection(MOFI->getCompactUnwindSection());
1872-
Streamer.emitValueToAlignment(AsmInfo->getCodePointerSize());
1872+
Streamer.emitValueToAlignment(Align(AsmInfo->getCodePointerSize()));
18731873
SectionEmitted = true;
18741874
}
18751875
NeedsEHFrameSection |=

llvm/lib/MC/MCELFStreamer.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ void MCELFStreamer::emitCommonSymbol(MCSymbol *S, uint64_t Size,
322322
MCSectionSubPair P = getCurrentSection();
323323
switchSection(&Section);
324324

325-
emitValueToAlignment(ByteAlignment, 0, 1, 0);
325+
emitValueToAlignment(Align(ByteAlignment), 0, 1, 0);
326326
emitLabel(Symbol);
327327
emitZeros(Size);
328328

@@ -365,14 +365,13 @@ void MCELFStreamer::emitValueImpl(const MCExpr *Value, unsigned Size,
365365
MCObjectStreamer::emitValueImpl(Value, Size, Loc);
366366
}
367367

368-
void MCELFStreamer::emitValueToAlignment(unsigned ByteAlignment,
369-
int64_t Value,
368+
void MCELFStreamer::emitValueToAlignment(Align Alignment, int64_t Value,
370369
unsigned ValueSize,
371370
unsigned MaxBytesToEmit) {
372371
if (isBundleLocked())
373372
report_fatal_error("Emitting values inside a locked bundle is forbidden");
374-
MCObjectStreamer::emitValueToAlignment(ByteAlignment, Value,
375-
ValueSize, MaxBytesToEmit);
373+
MCObjectStreamer::emitValueToAlignment(Alignment, Value, ValueSize,
374+
MaxBytesToEmit);
376375
}
377376

378377
void MCELFStreamer::emitCGProfileEntry(const MCSymbolRefExpr *From,

llvm/lib/MC/MCMachOStreamer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ void MCMachOStreamer::emitZerofill(MCSection *Section, MCSymbol *Symbol,
465465

466466
// The symbol may not be present, which only creates the section.
467467
if (Symbol) {
468-
emitValueToAlignment(ByteAlignment, 0, 1, 0);
468+
emitValueToAlignment(Align(ByteAlignment), 0, 1, 0);
469469
emitLabel(Symbol);
470470
emitZeros(Size);
471471
}

llvm/lib/MC/MCObjectStreamer.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -641,25 +641,23 @@ void MCObjectStreamer::emitBytes(StringRef Data) {
641641
DF->getContents().append(Data.begin(), Data.end());
642642
}
643643

644-
void MCObjectStreamer::emitValueToAlignment(unsigned ByteAlignment,
645-
int64_t Value,
644+
void MCObjectStreamer::emitValueToAlignment(Align Alignment, int64_t Value,
646645
unsigned ValueSize,
647646
unsigned MaxBytesToEmit) {
648647
if (MaxBytesToEmit == 0)
649-
MaxBytesToEmit = ByteAlignment;
650-
insert(new MCAlignFragment(Align(ByteAlignment), Value, ValueSize,
651-
MaxBytesToEmit));
648+
MaxBytesToEmit = Alignment.value();
649+
insert(new MCAlignFragment(Alignment, Value, ValueSize, MaxBytesToEmit));
652650

653651
// Update the maximum alignment on the current section if necessary.
654652
MCSection *CurSec = getCurrentSectionOnly();
655-
if (CurSec->getAlign() < ByteAlignment)
656-
CurSec->setAlignment(Align(ByteAlignment));
653+
if (CurSec->getAlign() < Alignment)
654+
CurSec->setAlignment(Alignment);
657655
}
658656

659657
void MCObjectStreamer::emitCodeAlignment(Align Alignment,
660658
const MCSubtargetInfo *STI,
661659
unsigned MaxBytesToEmit) {
662-
emitValueToAlignment(Alignment.value(), 0, 1, MaxBytesToEmit);
660+
emitValueToAlignment(Alignment, 0, 1, MaxBytesToEmit);
663661
cast<MCAlignFragment>(getCurrentFragment())->setEmitNops(true, STI);
664662
}
665663

llvm/lib/MC/MCParser/AsmParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3489,7 +3489,7 @@ bool AsmParser::parseDirectiveAlign(bool IsPow2, unsigned ValueSize) {
34893489
Align(Alignment), &getTargetParser().getSTI(), MaxBytesToFill);
34903490
} else {
34913491
// FIXME: Target specific behavior about how the "extra" bytes are filled.
3492-
getStreamer().emitValueToAlignment(Alignment, FillExpr, ValueSize,
3492+
getStreamer().emitValueToAlignment(Align(Alignment), FillExpr, ValueSize,
34933493
MaxBytesToFill);
34943494
}
34953495

llvm/lib/MC/MCParser/DarwinAsmParser.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ class DarwinAsmParser : public MCAsmParserExtension {
472472
} // end anonymous namespace
473473

474474
bool DarwinAsmParser::parseSectionSwitch(StringRef Segment, StringRef Section,
475-
unsigned TAA, unsigned Align,
475+
unsigned TAA, unsigned Alignment,
476476
unsigned StubSize) {
477477
if (getLexer().isNot(AsmToken::EndOfStatement))
478478
return TokError("unexpected token in section switching directive");
@@ -492,8 +492,8 @@ bool DarwinAsmParser::parseSectionSwitch(StringRef Segment, StringRef Section,
492492
// the section. However, this is arguably more reasonable behavior, and there
493493
// is no good reason for someone to intentionally emit incorrectly sized
494494
// values into the implicitly aligned sections.
495-
if (Align)
496-
getStreamer().emitValueToAlignment(Align);
495+
if (Alignment)
496+
getStreamer().emitValueToAlignment(Align(Alignment));
497497

498498
return false;
499499
}

llvm/lib/MC/MCParser/ELFAsmParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ bool ELFAsmParser::ParseDirectiveVersion(StringRef, SMLoc) {
868868
getStreamer().emitInt32(1); // type = NT_VERSION
869869
getStreamer().emitBytes(Data); // name
870870
getStreamer().emitInt8(0); // NUL
871-
getStreamer().emitValueToAlignment(4);
871+
getStreamer().emitValueToAlignment(Align(4));
872872
getStreamer().popSection();
873873
return false;
874874
}

llvm/lib/MC/MCParser/MasmParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4747,7 +4747,7 @@ bool MasmParser::emitAlignTo(int64_t Alignment) {
47474747
/*MaxBytesToEmit=*/0);
47484748
} else {
47494749
// FIXME: Target specific behavior about how the "extra" bytes are filled.
4750-
getStreamer().emitValueToAlignment(Alignment, /*Value=*/0,
4750+
getStreamer().emitValueToAlignment(Align(Alignment), /*Value=*/0,
47514751
/*ValueSize=*/1,
47524752
/*MaxBytesToEmit=*/0);
47534753
}

llvm/lib/MC/MCStreamer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ void MCStreamer::emitSLEB128Value(const MCExpr *Value) {}
12191219
void MCStreamer::emitFill(const MCExpr &NumBytes, uint64_t Value, SMLoc Loc) {}
12201220
void MCStreamer::emitFill(const MCExpr &NumValues, int64_t Size, int64_t Expr,
12211221
SMLoc Loc) {}
1222-
void MCStreamer::emitValueToAlignment(unsigned ByteAlignment, int64_t Value,
1222+
void MCStreamer::emitValueToAlignment(Align Alignment, int64_t Value,
12231223
unsigned ValueSize,
12241224
unsigned MaxBytesToEmit) {}
12251225
void MCStreamer::emitCodeAlignment(Align Alignment, const MCSubtargetInfo *STI,

0 commit comments

Comments
 (0)