mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
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
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user