diff options
| author | Logan Chien <tzuhsiang.chien@gmail.com> | 2014-02-22 14:00:39 +0000 |
|---|---|---|
| committer | Logan Chien <tzuhsiang.chien@gmail.com> | 2014-02-22 14:00:39 +0000 |
| commit | 80668d18e8064560bb6c227cde4e2a01d32e683e (patch) | |
| tree | 69fab20851cfdff7e1f0d2ee797e0cfe97809cee /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
| parent | fb24ccfa32c12dc7ab12b70f2c3db404dbab7581 (diff) | |
| download | llvm-80668d18e8064560bb6c227cde4e2a01d32e683e.tar.gz llvm-80668d18e8064560bb6c227cde4e2a01d32e683e.tar.bz2 llvm-80668d18e8064560bb6c227cde4e2a01d32e683e.tar.xz | |
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
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
| -rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 05006b33bc..2425948ae9 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -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(); |
