[llvm] Fix compress/decompress in LLVM Offloading API (PR #150064)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 11 02:19:07 PDT 2025
================
@@ -62,7 +62,7 @@ Error extractOffloadBundle(MemoryBufferRef Contents, uint64_t SectionOffset,
return createFileError(FileName, EC);
Expected<std::unique_ptr<MemoryBuffer>> DecompressedBufferOrErr =
- CompressedOffloadBundle::decompress(**CodeOrErr, false, errs());
+ CompressedOffloadBundle::decompress(**CodeOrErr, &nulls());
----------------
jh7370 wrote:
```suggestion
CompressedOffloadBundle::decompress(**CodeOrErr, nullptr);
```
Surely?
`nulls()` is still an object; it just doesn't print to anything, so this will result in the verbose printing logic still being executed. Of course, if there's no real issue doing so, we could make `VerboseStream` a reference and just past passing in `nulls()` as appropriate. (I forgot we had `nulls()` or I'd have mentioned it before).
https://github.com/llvm/llvm-project/pull/150064
More information about the llvm-commits
mailing list