mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-22 19:55:47 -04:00
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368813 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -392,13 +392,9 @@ ELFObjectFileBase::getPltAddresses() const {
|
||||
return {};
|
||||
Optional<SectionRef> Plt = None, RelaPlt = None, GotPlt = None;
|
||||
for (const SectionRef &Section : sections()) {
|
||||
Expected<StringRef> NameOrErr = Section.getName();
|
||||
if (!NameOrErr) {
|
||||
consumeError(NameOrErr.takeError());
|
||||
StringRef Name;
|
||||
if (Section.getName(Name))
|
||||
continue;
|
||||
}
|
||||
StringRef Name = *NameOrErr;
|
||||
|
||||
if (Name == ".plt")
|
||||
Plt = Section;
|
||||
else if (Name == ".rela.plt" || Name == ".rel.plt")
|
||||
|
||||
Reference in New Issue
Block a user