[PATCH] D37447: [Decompression] Fail gracefully when out of memory

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 5 03:28:38 PDT 2017


JDevlieghere added inline comments.


================
Comment at: lib/Object/Decompressor.cpp:98
+                                      bool) {
+  const auto *D = static_cast<class Decompressor *>(Data);
+  report_fatal_error("decompression of '" + Twine(D->SectionName) +
----------------
grimar wrote:
> Did you mean 'const' instead of 'class' ?
> Using of 'class' is inconsistend with LLVM code, I think it never uses it in
> `static_cast` expressions, so I would remove it.
I had a conflicting variable named `Decompressor` and the compiler suggested doing this. Because I have never had to use this I wanted to give it try before renaming the variable to `D`. I renamed the variable but forgot to remove `class`. Thanks!

Seems like `const` works here as well, I'll go with that :-) 


Repository:
  rL LLVM

https://reviews.llvm.org/D37447





More information about the llvm-commits mailing list