diff options
Diffstat (limited to 'lib/MC/MCObjectStreamer.cpp')
-rw-r--r-- | lib/MC/MCObjectStreamer.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/MC/MCObjectStreamer.cpp b/lib/MC/MCObjectStreamer.cpp index 506c963c59..f6753e3d1e 100644 --- a/lib/MC/MCObjectStreamer.cpp +++ b/lib/MC/MCObjectStreamer.cpp @@ -115,11 +115,21 @@ void MCObjectStreamer::EmitLabel(MCSymbol *Symbol) { void MCObjectStreamer::EmitULEB128Value(const MCExpr *Value, unsigned AddrSpace) { + int64_t IntValue; + if (Value->EvaluateAsAbsolute(IntValue, &getAssembler())) { + EmitULEB128IntValue(IntValue, AddrSpace); + return; + } new MCLEBFragment(*Value, false, getCurrentSectionData()); } void MCObjectStreamer::EmitSLEB128Value(const MCExpr *Value, unsigned AddrSpace) { + int64_t IntValue; + if (Value->EvaluateAsAbsolute(IntValue, &getAssembler())) { + EmitSLEB128IntValue(IntValue, AddrSpace); + return; + } new MCLEBFragment(*Value, true, getCurrentSectionData()); } |