summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/Decompressor.cpp
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2019-08-14 08:56:55 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2019-08-14 08:56:55 +0000
commit468919e18231d0c30b5c0f84a87145db06e3554b (patch)
treee1dbabaed556c88253db5a4bc75935b923ecf595 /llvm/lib/Object/Decompressor.cpp
parenta0c6a3571422826e856002714d9bb008584fe8b3 (diff)
downloadbcm5719-llvm-468919e18231d0c30b5c0f84a87145db06e3554b.tar.gz
bcm5719-llvm-468919e18231d0c30b5c0f84a87145db06e3554b.zip
Revert r368812 "[llvm/Object] - Convert SectionRef::getName() to return Expected<>"
It broke clang BB: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/16455 llvm-svn: 368813
Diffstat (limited to 'llvm/lib/Object/Decompressor.cpp')
-rw-r--r--llvm/lib/Object/Decompressor.cpp13
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) {
OpenPOWER on IntegriCloud