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 | 5b776b72f6faddb6a52d4f0f325b599949f98299 (patch) | |
tree | 03a8b11987ebbed511b19a18b5bc7063405d2e81 /llvm/lib/MC/MCDwarf.cpp | |
parent | 478873ce460b42af491168ee033302c1363f732a (diff) | |
download | bcm5719-llvm-5b776b72f6faddb6a52d4f0f325b599949f98299.tar.gz bcm5719-llvm-5b776b72f6faddb6a52d4f0f325b599949f98299.zip |
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.
llvm-svn: 201937
Diffstat (limited to 'llvm/lib/MC/MCDwarf.cpp')
-rw-r--r-- | llvm/lib/MC/MCDwarf.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp index d52c7a76928..98d78737cc6 100644 --- a/llvm/lib/MC/MCDwarf.cpp +++ b/llvm/lib/MC/MCDwarf.cpp @@ -157,8 +157,7 @@ static inline void EmitDwarfLineTable(MCStreamer *MCOS, } if (Discriminator != it->getDiscriminator()) { Discriminator = it->getDiscriminator(); - unsigned Size = - MCOS->getContext().getAsmInfo()->getULEB128Size(Discriminator); + unsigned Size = getULEB128Size(Discriminator); MCOS->EmitIntValue(dwarf::DW_LNS_extended_op, 1); MCOS->EmitULEB128IntValue(Size + 1); MCOS->EmitIntValue(dwarf::DW_LNE_set_discriminator, 1); |