llvm.org GIT mirror llvm / ac42e99
[MC] Rename EmitFill to emitFill This is to match the overloaded variants as well as the new style. Differential Revision: http://reviews.llvm.org/D20690 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271359 91177308-0d34-0410-b5e6-96231b3b80d8 Petr Hosek 4 years ago
9 changed file(s) with 17 addition(s) and 17 deletion(s). Raw diff Collapse all Expand all
139139 void EmitGPRel64Value(const MCExpr *Value) override;
140140 bool EmitRelocDirective(const MCExpr &Offset, StringRef Name,
141141 const MCExpr *Expr, SMLoc Loc) override;
142 void EmitFill(uint64_t NumBytes, uint8_t FillValue) override;
142 void emitFill(uint64_t NumBytes, uint8_t FillValue) override;
143143 void emitFill(const MCExpr &NumBytes, uint64_t FillValue,
144144 SMLoc Loc = SMLoc()) override;
145145 void emitFill(const MCExpr &NumValues, int64_t Size, int64_t Expr,
578578
579579 /// \brief Emit NumBytes bytes worth of the value specified by FillValue.
580580 /// This implements directives such as '.space'.
581 virtual void EmitFill(uint64_t NumBytes, uint8_t FillValue);
581 virtual void emitFill(uint64_t NumBytes, uint8_t FillValue);
582582
583583 /// \brief Emit \p Size bytes worth of the value specified by \p FillValue.
584584 ///
19541954 uint64_t Bytes = DL.getTypeAllocSize(CDS->getType());
19551955 // Don't emit a 1-byte object as a .fill.
19561956 if (Bytes > 1)
1957 return AP.OutStreamer->EmitFill(Bytes, Value);
1957 return AP.OutStreamer->emitFill(Bytes, Value);
19581958 }
19591959
19601960 // If this can be emitted with .ascii/.asciz, emit it as such.
19931993
19941994 if (Value != -1) {
19951995 uint64_t Bytes = DL.getTypeAllocSize(CA->getType());
1996 AP.OutStreamer->EmitFill(Bytes, Value);
1996 AP.OutStreamer->emitFill(Bytes, Value);
19971997 }
19981998 else {
19991999 for (unsigned i = 0, e = CA->getNumOperands(); i != e; ++i) {
16651665 Asm->OutStreamer->AddComment("Segment Size (in bytes)");
16661666 Asm->EmitInt8(0);
16671667
1668 Asm->OutStreamer->EmitFill(Padding, 0xff);
1668 Asm->OutStreamer->emitFill(Padding, 0xff);
16691669
16701670 for (const ArangeSpan &Span : List) {
16711671 Asm->EmitLabelReference(Span.Start, PtrSize);
178178 void EmitGPRel32Value(const MCExpr *Value) override;
179179
180180
181 void EmitFill(uint64_t NumBytes, uint8_t FillValue) override;
181 void emitFill(uint64_t NumBytes, uint8_t FillValue) override;
182182
183183 void emitFill(const MCExpr &NumBytes, uint64_t FillValue,
184184 SMLoc Loc = SMLoc()) override;
818818 EmitEOL();
819819 }
820820
821 /// EmitFill - Emit NumBytes bytes worth of the value specified by
821 /// emitFill - Emit NumBytes bytes worth of the value specified by
822822 /// FillValue. This implements directives such as '.space'.
823 void MCAsmStreamer::EmitFill(uint64_t NumBytes, uint8_t FillValue) {
823 void MCAsmStreamer::emitFill(uint64_t NumBytes, uint8_t FillValue) {
824824 if (NumBytes == 0) return;
825825
826826 const MCExpr *E = MCConstantExpr::create(NumBytes, getContext());
819819 // Emit a base address selection entry for the start of this section
820820 const MCExpr *SectionStartAddr = MCSymbolRefExpr::create(
821821 StartSymbol, MCSymbolRefExpr::VK_None, context);
822 MCOS->EmitFill(AddrSize, 0xFF);
822 MCOS->emitFill(AddrSize, 0xFF);
823823 MCOS->EmitValue(SectionStartAddr, AddrSize);
824824
825825 // Emit a range list entry spanning this section
489489 return false;
490490 }
491491
492 void MCObjectStreamer::EmitFill(uint64_t NumBytes, uint8_t FillValue) {
492 void MCObjectStreamer::emitFill(uint64_t NumBytes, uint8_t FillValue) {
493493 const MCSection *Sec = getCurrentSection().first;
494494 (void)Sec;
495495 assert(Sec && "need a section");
512512 return;
513513 }
514514
515 EmitFill(IntNumBytes, FillValue);
515 emitFill(IntNumBytes, FillValue);
516516 }
517517
518518 void MCObjectStreamer::emitFill(const MCExpr &NumValues, int64_t Size,
131131 report_fatal_error("unsupported directive in streamer");
132132 }
133133
134 /// EmitFill - Emit NumBytes bytes worth of the value specified by
135 /// FillValue. This implements directives such as '.space'.
136 void MCStreamer::EmitFill(uint64_t NumBytes, uint8_t FillValue) {
134 /// Emit NumBytes bytes worth of the value specified by FillValue.
135 /// This implements directives such as '.space'.
136 void MCStreamer::emitFill(uint64_t NumBytes, uint8_t FillValue) {
137137 for (uint64_t i = 0, e = NumBytes; i != e; ++i)
138138 EmitIntValue(FillValue, 1);
139139 }
148148 }
149149 }
150150
151 /// The implementation in this class just redirects to EmitFill.
151 /// The implementation in this class just redirects to emitFill.
152152 void MCStreamer::EmitZeros(uint64_t NumBytes) {
153 EmitFill(NumBytes, 0);
153 emitFill(NumBytes, 0);
154154 }
155155
156156 unsigned MCStreamer::EmitDwarfFileDirective(unsigned FileNo,
791791 Asm->EmitInt8(AddressSize); // Address size
792792 Asm->EmitInt8(0); // Segment size
793793
794 Asm->OutStreamer->EmitFill(Padding, 0x0);
794 Asm->OutStreamer->emitFill(Padding, 0x0);
795795
796796 for (auto Range = Ranges.begin(), End = Ranges.end(); Range != End;
797797 ++Range) {