This is an archive of the discontinued LLVM Phabricator instance.

Add a lower level zlib::uncompress
ClosedPublic

Authored by rafael on Sep 8 2016, 6:11 AM.

Details

Reviewers
dblaikie
ruiu
Summary

SmallVectors are convenient, but they don't cover every use case.

In particular, they are fairly large (3 pointers + one element) and there is no way to take ownership of the buffer to put it somewhere else.
This patch then adds a lower lever interface that works with any buffer.

Diff Detail

Event Timeline

rafael updated this revision to Diff 70690.Sep 8 2016, 6:11 AM
rafael retitled this revision from to Add a lower level zlib::uncompress.
rafael updated this object.
rafael added reviewers: dblaikie, ruiu.
rafael added a subscriber: llvm-commits.
ruiu added inline comments.Sep 8 2016, 6:21 PM
include/llvm/Support/Compression.h
46

uint8_t * is better than char *, no?

rafael added inline comments.Sep 9 2016, 4:54 AM
include/llvm/Support/Compression.h
46

Probably not in here since the rest of the API uses SmallVectorImpl<char>. We could change the rest to use SmallVectorImpl<uint8_t>, but should be another patch.

ruiu accepted this revision.Sep 9 2016, 10:37 AM
ruiu edited edge metadata.

LGTM

This revision is now accepted and ready to land.Sep 9 2016, 10:37 AM