mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 06:33:24 +00:00
These functions have default arguments of 0 for the last arg. Use
them and add one where it seemed obvious that we wanted one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171932 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
df8c22a104
commit
ca1dd05c3c
@ -86,7 +86,7 @@ public:
|
||||
virtual void EmitBundleAlignMode(unsigned AlignPow2);
|
||||
virtual void EmitBundleLock(bool AlignToEnd);
|
||||
virtual void EmitBundleUnlock();
|
||||
virtual void EmitBytes(StringRef Data, unsigned AddrSpace);
|
||||
virtual void EmitBytes(StringRef Data, unsigned AddrSpace = 0);
|
||||
virtual void EmitValueToAlignment(unsigned ByteAlignment,
|
||||
int64_t Value = 0,
|
||||
unsigned ValueSize = 1,
|
||||
@ -103,7 +103,7 @@ public:
|
||||
virtual void EmitGPRel32Value(const MCExpr *Value);
|
||||
virtual void EmitGPRel64Value(const MCExpr *Value);
|
||||
virtual void EmitFill(uint64_t NumBytes, uint8_t FillValue,
|
||||
unsigned AddrSpace);
|
||||
unsigned AddrSpace = 0);
|
||||
virtual void FinishImpl();
|
||||
|
||||
/// @}
|
||||
|
@ -366,7 +366,7 @@ namespace llvm {
|
||||
///
|
||||
/// This is used to implement assembler directives such as .byte, .ascii,
|
||||
/// etc.
|
||||
virtual void EmitBytes(StringRef Data, unsigned AddrSpace) = 0;
|
||||
virtual void EmitBytes(StringRef Data, unsigned AddrSpace = 0) = 0;
|
||||
|
||||
/// EmitValue - Emit the expression @p Value into the output as a native
|
||||
/// integer of the given @p Size bytes.
|
||||
@ -429,11 +429,11 @@ namespace llvm {
|
||||
/// EmitFill - Emit NumBytes bytes worth of the value specified by
|
||||
/// FillValue. This implements directives such as '.space'.
|
||||
virtual void EmitFill(uint64_t NumBytes, uint8_t FillValue,
|
||||
unsigned AddrSpace);
|
||||
unsigned AddrSpace = 0);
|
||||
|
||||
/// EmitZeros - Emit NumBytes worth of zeros. This is a convenience
|
||||
/// function that just wraps EmitFill.
|
||||
void EmitZeros(uint64_t NumBytes, unsigned AddrSpace) {
|
||||
void EmitZeros(uint64_t NumBytes, unsigned AddrSpace = 0) {
|
||||
EmitFill(NumBytes, 0, AddrSpace);
|
||||
}
|
||||
|
||||
|
@ -1040,7 +1040,7 @@ void AsmPrinter::EmitConstantPool() {
|
||||
// Emit inter-object padding for alignment.
|
||||
unsigned AlignMask = CPE.getAlignment() - 1;
|
||||
unsigned NewOffset = (Offset + AlignMask) & ~AlignMask;
|
||||
OutStreamer.EmitFill(NewOffset - Offset, 0/*fillval*/, 0/*addrspace*/);
|
||||
OutStreamer.EmitZeros(NewOffset - Offset);
|
||||
|
||||
Type *Ty = CPE.getType();
|
||||
Offset = NewOffset + TM.getDataLayout()->getTypeAllocSize(Ty);
|
||||
@ -1203,7 +1203,7 @@ void AsmPrinter::EmitJumpTableEntry(const MachineJumpTableInfo *MJTI,
|
||||
assert(Value && "Unknown entry kind!");
|
||||
|
||||
unsigned EntrySize = MJTI->getEntrySize(*TM.getDataLayout());
|
||||
OutStreamer.EmitValue(Value, EntrySize, /*addrspace*/0);
|
||||
OutStreamer.EmitValue(Value, EntrySize);
|
||||
}
|
||||
|
||||
|
||||
@ -1326,19 +1326,19 @@ void AsmPrinter::EmitXXStructorList(const Constant *List, bool isCtor) {
|
||||
/// EmitInt8 - Emit a byte directive and value.
|
||||
///
|
||||
void AsmPrinter::EmitInt8(int Value) const {
|
||||
OutStreamer.EmitIntValue(Value, 1, 0/*addrspace*/);
|
||||
OutStreamer.EmitIntValue(Value, 1);
|
||||
}
|
||||
|
||||
/// EmitInt16 - Emit a short directive and value.
|
||||
///
|
||||
void AsmPrinter::EmitInt16(int Value) const {
|
||||
OutStreamer.EmitIntValue(Value, 2, 0/*addrspace*/);
|
||||
OutStreamer.EmitIntValue(Value, 2);
|
||||
}
|
||||
|
||||
/// EmitInt32 - Emit a long directive and value.
|
||||
///
|
||||
void AsmPrinter::EmitInt32(int Value) const {
|
||||
OutStreamer.EmitIntValue(Value, 4, 0/*addrspace*/);
|
||||
OutStreamer.EmitIntValue(Value, 4);
|
||||
}
|
||||
|
||||
/// EmitLabelDifference - Emit something like ".long Hi-Lo" where the size
|
||||
@ -1353,14 +1353,14 @@ void AsmPrinter::EmitLabelDifference(const MCSymbol *Hi, const MCSymbol *Lo,
|
||||
OutContext);
|
||||
|
||||
if (!MAI->hasSetDirective()) {
|
||||
OutStreamer.EmitValue(Diff, Size, 0/*AddrSpace*/);
|
||||
OutStreamer.EmitValue(Diff, Size);
|
||||
return;
|
||||
}
|
||||
|
||||
// Otherwise, emit with .set (aka assignment).
|
||||
MCSymbol *SetLabel = GetTempSymbol("set", SetCounter++);
|
||||
OutStreamer.EmitAssignment(SetLabel, Diff);
|
||||
OutStreamer.EmitSymbolValue(SetLabel, Size, 0/*AddrSpace*/);
|
||||
OutStreamer.EmitSymbolValue(SetLabel, Size);
|
||||
}
|
||||
|
||||
/// EmitLabelOffsetDifference - Emit something like ".long Hi+Offset-Lo"
|
||||
@ -1384,12 +1384,12 @@ void AsmPrinter::EmitLabelOffsetDifference(const MCSymbol *Hi, uint64_t Offset,
|
||||
OutContext);
|
||||
|
||||
if (!MAI->hasSetDirective())
|
||||
OutStreamer.EmitValue(Diff, 4, 0/*AddrSpace*/);
|
||||
OutStreamer.EmitValue(Diff, 4);
|
||||
else {
|
||||
// Otherwise, emit with .set (aka assignment).
|
||||
MCSymbol *SetLabel = GetTempSymbol("set", SetCounter++);
|
||||
OutStreamer.EmitAssignment(SetLabel, Diff);
|
||||
OutStreamer.EmitSymbolValue(SetLabel, 4, 0/*AddrSpace*/);
|
||||
OutStreamer.EmitSymbolValue(SetLabel, 4);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1407,7 +1407,7 @@ void AsmPrinter::EmitLabelPlusOffset(const MCSymbol *Label, uint64_t Offset,
|
||||
MCConstantExpr::Create(Offset, OutContext),
|
||||
OutContext);
|
||||
|
||||
OutStreamer.EmitValue(Expr, Size, 0/*AddrSpace*/);
|
||||
OutStreamer.EmitValue(Expr, Size);
|
||||
}
|
||||
|
||||
|
||||
|
@ -58,7 +58,7 @@ void AsmPrinter::EmitCFAByte(unsigned Val) const {
|
||||
else
|
||||
OutStreamer.AddComment(dwarf::CallFrameString(Val));
|
||||
}
|
||||
OutStreamer.EmitIntValue(Val, 1, 0/*addrspace*/);
|
||||
OutStreamer.EmitIntValue(Val, 1);
|
||||
}
|
||||
|
||||
static const char *DecodeDWARFEncoding(unsigned Encoding) {
|
||||
@ -102,7 +102,7 @@ void AsmPrinter::EmitEncodingByte(unsigned Val, const char *Desc) const {
|
||||
DecodeDWARFEncoding(Val));
|
||||
}
|
||||
|
||||
OutStreamer.EmitIntValue(Val, 1, 0/*addrspace*/);
|
||||
OutStreamer.EmitIntValue(Val, 1);
|
||||
}
|
||||
|
||||
/// GetSizeOfEncodedValue - Return the size of the encoding in bytes.
|
||||
@ -126,9 +126,9 @@ void AsmPrinter::EmitTTypeReference(const GlobalValue *GV,
|
||||
|
||||
const MCExpr *Exp =
|
||||
TLOF.getTTypeGlobalReference(GV, Mang, MMI, Encoding, OutStreamer);
|
||||
OutStreamer.EmitValue(Exp, GetSizeOfEncodedValue(Encoding), /*addrspace*/0);
|
||||
OutStreamer.EmitValue(Exp, GetSizeOfEncodedValue(Encoding));
|
||||
} else
|
||||
OutStreamer.EmitIntValue(0, GetSizeOfEncodedValue(Encoding), 0);
|
||||
OutStreamer.EmitIntValue(0, GetSizeOfEncodedValue(Encoding));
|
||||
}
|
||||
|
||||
/// EmitSectionOffset - Emit the 4-byte offset of Label from the start of its
|
||||
@ -157,7 +157,7 @@ void AsmPrinter::EmitSectionOffset(const MCSymbol *Label,
|
||||
// If the section in question will end up with an address of 0 anyway, we can
|
||||
// just emit an absolute reference to save a relocation.
|
||||
if (Section.isBaseAddressKnownZero()) {
|
||||
OutStreamer.EmitSymbolValue(Label, 4, 0/*AddrSpace*/);
|
||||
OutStreamer.EmitSymbolValue(Label, 4);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -204,7 +204,7 @@ void DIEInteger::EmitValue(AsmPrinter *Asm, unsigned Form) const {
|
||||
Size = Asm->getDataLayout().getPointerSize(); break;
|
||||
default: llvm_unreachable("DIE Value form not supported yet");
|
||||
}
|
||||
Asm->OutStreamer.EmitIntValue(Integer, Size, 0/*addrspace*/);
|
||||
Asm->OutStreamer.EmitIntValue(Integer, Size);
|
||||
}
|
||||
|
||||
/// SizeOf - Determine size of integer value in bytes.
|
||||
@ -243,7 +243,7 @@ void DIEInteger::print(raw_ostream &O) {
|
||||
/// EmitValue - Emit label value.
|
||||
///
|
||||
void DIELabel::EmitValue(AsmPrinter *AP, unsigned Form) const {
|
||||
AP->OutStreamer.EmitSymbolValue(Label, SizeOf(AP, Form), 0/*AddrSpace*/);
|
||||
AP->OutStreamer.EmitSymbolValue(Label, SizeOf(AP, Form));
|
||||
}
|
||||
|
||||
/// SizeOf - Determine size of label value in bytes.
|
||||
|
@ -1942,8 +1942,7 @@ void DwarfDebug::emitEndOfLineMatrix(unsigned SectionEnd) {
|
||||
Asm->OutStreamer.AddComment("Section end label");
|
||||
|
||||
Asm->OutStreamer.EmitSymbolValue(Asm->GetTempSymbol("section_end",SectionEnd),
|
||||
Asm->getDataLayout().getPointerSize(),
|
||||
0/*AddrSpace*/);
|
||||
Asm->getDataLayout().getPointerSize());
|
||||
|
||||
// Mark end of matrix.
|
||||
Asm->OutStreamer.AddComment("DW_LNE_end_sequence");
|
||||
@ -2152,8 +2151,7 @@ void DwarfUnits::emitStrings(const MCSection *StrSection,
|
||||
|
||||
// Emit the string itself with a terminating null byte.
|
||||
Asm->OutStreamer.EmitBytes(StringRef(Entries[i].second->getKeyData(),
|
||||
Entries[i].second->getKeyLength()+1),
|
||||
0/*addrspace*/);
|
||||
Entries[i].second->getKeyLength()+1));
|
||||
}
|
||||
|
||||
// If we've got an offset section go ahead and emit that now as well.
|
||||
@ -2199,8 +2197,8 @@ void DwarfDebug::emitDebugLoc() {
|
||||
DotDebugLocEntry &Entry = *I;
|
||||
if (Entry.isMerged()) continue;
|
||||
if (Entry.isEmpty()) {
|
||||
Asm->OutStreamer.EmitIntValue(0, Size, /*addrspace*/0);
|
||||
Asm->OutStreamer.EmitIntValue(0, Size, /*addrspace*/0);
|
||||
Asm->OutStreamer.EmitIntValue(0, Size);
|
||||
Asm->OutStreamer.EmitIntValue(0, Size);
|
||||
Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("debug_loc", index));
|
||||
} else {
|
||||
Asm->OutStreamer.EmitSymbolValue(Entry.Begin, Size, 0);
|
||||
@ -2292,7 +2290,7 @@ void DwarfDebug::emitDebugRanges() {
|
||||
if (*I)
|
||||
Asm->OutStreamer.EmitSymbolValue(const_cast<MCSymbol*>(*I), Size, 0);
|
||||
else
|
||||
Asm->OutStreamer.EmitIntValue(0, Size, /*addrspace*/0);
|
||||
Asm->OutStreamer.EmitIntValue(0, Size);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -608,7 +608,7 @@ void DwarfException::EmitExceptionTable() {
|
||||
if (!S.PadLabel) {
|
||||
if (VerboseAsm)
|
||||
Asm->OutStreamer.AddComment(" has no landing pad");
|
||||
Asm->OutStreamer.EmitIntValue(0, 4/*size*/, 0/*addrspace*/);
|
||||
Asm->OutStreamer.EmitIntValue(0, 4/*size*/);
|
||||
} else {
|
||||
if (VerboseAsm)
|
||||
Asm->OutStreamer.AddComment(Twine(" jumps to ") +
|
||||
|
@ -315,7 +315,7 @@ bool MCObjectStreamer::EmitValueToOffset(const MCExpr *Offset,
|
||||
|
||||
if (!Delta->EvaluateAsAbsolute(Res, getAssembler()))
|
||||
return true;
|
||||
EmitFill(Res, Value, 0);
|
||||
EmitFill(Res, Value);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user