mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Move get[S|U]LEB128Size() to LEB128.h.
This commit moves getSLEB128Size() and getULEB128Size() from MCAsmInfo to LEB128.h and removes some copy-and-paste code. Besides, this commit also adds some unit tests for the LEB128 functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201937 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -38,6 +38,7 @@
|
||||
#include "llvm/Support/Dwarf.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Support/FormattedStream.h"
|
||||
#include "llvm/Support/LEB128.h"
|
||||
#include "llvm/Support/MD5.h"
|
||||
#include "llvm/Support/Path.h"
|
||||
#include "llvm/Support/Timer.h"
|
||||
@ -1876,7 +1877,7 @@ unsigned DwarfFile::computeSizeAndOffset(DIE *Die, unsigned Offset) {
|
||||
Die->setOffset(Offset);
|
||||
|
||||
// Start the size with the size of abbreviation code.
|
||||
Offset += MCAsmInfo::getULEB128Size(Die->getAbbrevNumber());
|
||||
Offset += getULEB128Size(Die->getAbbrevNumber());
|
||||
|
||||
const SmallVectorImpl<DIEValue *> &Values = Die->getValues();
|
||||
const SmallVectorImpl<DIEAbbrevData> &AbbrevData = Abbrev.getData();
|
||||
|
Reference in New Issue
Block a user