diff options
author | Jim Grosbach <grosbach@apple.com> | 2012-08-08 23:56:06 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2012-08-08 23:56:06 +0000 |
commit | 2d39a0e52df9ce050bd4e2de3a2ecca8fd9a87c3 (patch) | |
tree | 5cbceaa7838dcbf235112928cd53adf48e3b5244 /lib/MC/MCAssembler.cpp | |
parent | fdd6484b41ef0fa7eb8c995fb34b728b193c6258 (diff) |
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
Diffstat (limited to 'lib/MC/MCAssembler.cpp')
-rw-r--r-- | lib/MC/MCAssembler.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp index 8329ce8a4c..05519b56ff 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(); } |