diff options
Diffstat (limited to 'llvm/lib/Object/Decompressor.cpp')
-rw-r--r-- | llvm/lib/Object/Decompressor.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/llvm/lib/Object/Decompressor.cpp b/llvm/lib/Object/Decompressor.cpp index 11efd857d1a..53b8e846e5f 100644 --- a/llvm/lib/Object/Decompressor.cpp +++ b/llvm/lib/Object/Decompressor.cpp @@ -77,15 +77,10 @@ bool Decompressor::isGnuStyle(StringRef Name) { } bool Decompressor::isCompressed(const object::SectionRef &Section) { - if (Section.isCompressed()) - return true; - - Expected<StringRef> SecNameOrErr = Section.getName(); - if (SecNameOrErr) - return isGnuStyle(*SecNameOrErr); - - consumeError(SecNameOrErr.takeError()); - return false; + StringRef Name; + if (Section.getName(Name)) + return false; + return Section.isCompressed() || isGnuStyle(Name); } bool Decompressor::isCompressedELFSection(uint64_t Flags, StringRef Name) { |