mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-07 03:40:35 +00:00
Fix llvm-gcc boostrap on OS X by avoiding printing sleb and uleb when
possible. llvm-svn: 119785
This commit is contained in:
parent
9dbf2d0626
commit
921ef0c471
@ -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