aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-01-22 20:31:01 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-01-22 20:31:01 +0000
commit8bcb0991864975618c09697b1aca10683346d9f0 (patch)
tree0afab28faa50e5f27698f8dd6c1921fff8d25e39 /contrib/llvm-project/llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp
parentb14637d118e110006a149a79b649c5695e7f419a (diff)
parent1d5ae1026e831016fc29fd927877c86af904481f (diff)
Notes
Diffstat (limited to 'contrib/llvm-project/llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp')
-rw-r--r--contrib/llvm-project/llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/llvm-project/llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp b/contrib/llvm-project/llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp
index 833312655788..03e1bab9417e 100644
--- a/contrib/llvm-project/llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp
+++ b/contrib/llvm-project/llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp
@@ -174,7 +174,11 @@ static void dumpCXXData(const ObjectFile *Obj) {
SectionRelocMap.clear();
for (const SectionRef &Section : Obj->sections()) {
- section_iterator Sec2 = Section.getRelocatedSection();
+ Expected<section_iterator> ErrOrSec = Section.getRelocatedSection();
+ if (!ErrOrSec)
+ error(ErrOrSec.takeError());
+
+ section_iterator Sec2 = *ErrOrSec;
if (Sec2 != Obj->section_end())
SectionRelocMap[*Sec2].push_back(Section);
}