OSDN Git Service

DataExtractor: use decodeSLEB128 to implement getSLEB128
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 24 Jun 2019 23:45:18 +0000 (23:45 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 24 Jun 2019 23:45:18 +0000 (23:45 +0000)
commitea1783464b533b95d720bdc4cc23450f24943ab7
tree1d9989aafed9070d1e35fb4daf9b7ef2fe727cb9
parentb499d7dbfffd46f80e0acb2358b53071a2ceb282
DataExtractor: use decodeSLEB128 to implement getSLEB128

Should've been NFC, but turns out DataExtractor had better test coverage
for decoding SLEB128 than the decodeSLEB128 did - revealing a couple of
bugs (one in the error handling, another in sign extension). So fixed
those to get the DataExtractor tests passing again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364253 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/LEB128.h
lib/Support/DataExtractor.cpp