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 | bf387df302096597626293d01ea06fd1ccdeeac1 (patch) | |
tree | 0b213fc9476aa2e41cda96ffb61c6c1d267b3698 /llvm/lib/MC/MCAssembler.cpp | |
parent | 934dbbfa115a1ea9d7cddd2159ca493d0bb3a33f (diff) | |
download | bcm5719-llvm-bf387df302096597626293d01ea06fd1ccdeeac1.tar.gz bcm5719-llvm-bf387df302096597626293d01ea06fd1ccdeeac1.zip |
Move [SU]LEB128 encoding to a utility header.
These functions are very generic. There's no reason for them to
be tied to MCObjectWriter.
llvm-svn: 161545
Diffstat (limited to 'llvm/lib/MC/MCAssembler.cpp')
-rw-r--r-- | llvm/lib/MC/MCAssembler.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp index 8329ce8a4c2..05519b56ffe 100644 --- a/llvm/lib/MC/MCAssembler.cpp +++ b/llvm/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(); } |