[PATCH] D28515: [Support] - Introduce zlib::toString(zlib::Status)
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 10 23:57:51 PST 2017
grimar added inline comments.
================
Comment at: lib/Support/Compression.cpp:94-95
+ return "";
+ case zlib::StatusUnsupported:
+ return "zlib is unavailable";
+ case zlib::StatusOutOfMemory:
----------------
davide wrote:
> `isAvailable()` returns always true, so, how can this be ever hit?
I can imagine some code like next:
```
Status S = zlib::StatusUnsupported;
if (zlib::isAvailable() {
S = ...; //Do something
}
if (S != zlib::StatusOK)
printError(zlib::toString(S)
```
So it looks can be useful to cover this enum value too.
https://reviews.llvm.org/D28515
More information about the llvm-commits
mailing list