summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF
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/DebugInfo/DWARF
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/DebugInfo/DWARF')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFContext.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
index 2379ba66aa3..4b66a305a3d 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
@@ -1506,11 +1506,7 @@ public:
StringMap<unsigned> SectionAmountMap;
for (const SectionRef &Section : Obj.sections()) {
StringRef Name;
- if (auto NameOrErr = Section.getName())
- Name = *NameOrErr;
- else
- consumeError(NameOrErr.takeError());
-
+ Section.getName(Name);
++SectionAmountMap[Name];
SectionNames.push_back({ Name, true });
@@ -1575,15 +1571,12 @@ public:
continue;
StringRef RelSecName;
- if (auto NameOrErr = RelocatedSection->getName())
- RelSecName = *NameOrErr;
- else
- consumeError(NameOrErr.takeError());
+ StringRef RelSecData;
+ RelocatedSection->getName(RelSecName);
// If the section we're relocating was relocated already by the JIT,
// then we used the relocated version above, so we do not need to process
// relocations for it now.
- StringRef RelSecData;
if (L && L->getLoadedSectionContents(*RelocatedSection, RelSecData))
continue;
OpenPOWER on IntegriCloud