[lib/Object] - Minor API update for llvm::Decompressor.
authorGeorge Rimar <grimar@accesssoftek.com>
Thu, 18 May 2017 08:00:01 +0000 (08:00 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Thu, 18 May 2017 08:00:01 +0000 (08:00 +0000)
commitf98b9ac5daa2ceff3ce98123bee62cafa84e3144
tree16cc5bd1bc20dbf52681e594c22f6568b48b4c74
parentba6b315ea92fec6bdf5092511c23f6681805cfd0
[lib/Object] - Minor API update for llvm::Decompressor.

I revisited Decompressor API (issue with it was triggered during D32865 review)
and found it is probably provides more then we really need.

Issue was about next method's signature:

Error decompress(SmallString<32> &Out);
It is too strict. At first I wanted to change it to decompress(SmallVectorImpl<char> &Out),
but then found it is still not flexible because sticks to SmallVector.

During reviews was suggested to use templating to simplify code. Patch do that.

Differential revision: https://reviews.llvm.org/D33200

llvm-svn: 303331
llvm/include/llvm/Object/Decompressor.h
llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
llvm/lib/Object/Decompressor.cpp
llvm/tools/llvm-dwp/llvm-dwp.cpp