mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Fix llvm-gcc boostrap on OS X by avoiding printing sleb and uleb when
possible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119785 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0f60ddc277
commit
a4b23ffced
@ -535,12 +535,28 @@ void MCAsmStreamer::EmitValue(const MCExpr *Value, unsigned Size,
|
||||
}
|
||||
|
||||
void MCAsmStreamer::EmitULEB128Value(const MCExpr *Value, unsigned AddrSpace) {
|
||||
int64_t IntValue;
|
||||
if (Value->EvaluateAsAbsolute(IntValue)) {
|
||||
SmallString<32> Tmp;
|
||||
raw_svector_ostream OSE(Tmp);
|
||||
MCObjectWriter::EncodeULEB128(IntValue, OSE);
|
||||
EmitBytes(OSE.str(), AddrSpace);
|
||||
return;
|
||||
}
|
||||
assert(MAI.hasLEB128() && "Cannot print a .uleb");
|
||||
OS << ".uleb128 " << *Value;
|
||||
EmitEOL();
|
||||
}
|
||||
|
||||
void MCAsmStreamer::EmitSLEB128Value(const MCExpr *Value, unsigned AddrSpace) {
|
||||
int64_t IntValue;
|
||||
if (Value->EvaluateAsAbsolute(IntValue)) {
|
||||
SmallString<32> Tmp;
|
||||
raw_svector_ostream OSE(Tmp);
|
||||
MCObjectWriter::EncodeSLEB128(IntValue, OSE);
|
||||
EmitBytes(OSE.str(), AddrSpace);
|
||||
return;
|
||||
}
|
||||
assert(MAI.hasLEB128() && "Cannot print a .sleb");
|
||||
OS << ".sleb128 " << *Value;
|
||||
EmitEOL();
|
||||
|
Loading…
Reference in New Issue
Block a user