[PATCH] D28679: [llvm-dwp] - Reuse object::Decompressor class
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 13 07:46:15 PST 2017
>> + Expected<Decompressor> Dec =
>> + Decompressor::create(Name, Contents, false /*IsLE*/, false /*Is64Bit*/);
>> + if (!Dec)
>> + return createError(Name, Dec.takeError());
>
>Why not just return Dec.takeError()?
>
>Cheers,
>Rafael
compressfail.test initially reported something like:
error: failure while decompressing compressed section: 'zdebug_{{.*}}.dwo'
Decompressor::create() can return next text
for this this patch:
"zlib is not available"
"corrupted compressed section header"
"corrupted uncompressed section size"
For first one "return Dec.takeError()" would probably work, but other 2 relative
to corrupted header probably require print of section name too.
Otherwise we end up with inconsistent error messages, like:
"corrupted compressed section header"
vs
"failure while decompressing compressed section: 'zdebug_{{.*}}.dwo', <SOME REASON HERE>"
Best regards,
George.
More information about the llvm-commits
mailing list