[PATCH] D33200: [lib/Object] - Minor API update for llvm::Decompressor (simplify).

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Mon May 15 08:29:08 PDT 2017


>This just inlines the method everywhere. If you want to be able to use
>something like a std::string, why not just use a template:
>
>template<class T>
>Error Decompressor::resizeAnddecompress(T &Out) {
>  Out.resize(DecompressedSize);
>  return decompress({Out.data(), (size_t)DecompressedSize});
>}
>
>Cheers,
>Rafael

I like the idea.
Adding a new template resizeAndDecompress() method for that looks better for me then 
have decompress() that may resize something, like we had before.

George.


More information about the llvm-commits mailing list