From 2d39a0e52df9ce050bd4e2de3a2ecca8fd9a87c3 Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Wed, 8 Aug 2012 23:56:06 +0000 Subject: Move [SU]LEB128 encoding to a utility header. These functions are very generic. There's no reason for them to be tied to MCObjectWriter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161545 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/MCAssembler.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/MC/MCAssembler.cpp') diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp index 8329ce8..05519b5 100644 --- a/lib/MC/MCAssembler.cpp +++ b/lib/MC/MCAssembler.cpp @@ -27,6 +27,7 @@ #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Support/TargetRegistry.h" +#include "llvm/Support/LEB128.h" using namespace llvm; @@ -713,9 +714,9 @@ bool MCAssembler::relaxLEB(MCAsmLayout &Layout, MCLEBFragment &LF) { Data.clear(); raw_svector_ostream OSE(Data); if (LF.isSigned()) - MCObjectWriter::EncodeSLEB128(Value, OSE); + encodeSLEB128(Value, OSE); else - MCObjectWriter::EncodeULEB128(Value, OSE); + encodeULEB128(Value, OSE); OSE.flush(); return OldSize != LF.getContents().size(); } -- cgit v1.1