diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-08-07 23:27:14 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-08-07 23:27:14 +0000 |
commit | e84d8c12d5157a926db15976389f703809c49aa5 (patch) | |
tree | 6f5b50f41f0d132b6218ad28661ddf89d77b57de /tools/llvm-rtdyld | |
parent | 3a16c7948a67a16da7a968984201b1f85a8009fa (diff) |
Convert getSymbolSection to return an ErrorOr.
This function can actually fail since the symbol contains an index to the
section and that can be invalid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244375 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-rtdyld')
-rw-r--r-- | tools/llvm-rtdyld/llvm-rtdyld.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/llvm-rtdyld/llvm-rtdyld.cpp b/tools/llvm-rtdyld/llvm-rtdyld.cpp index d6423a3e693..d8699505f59 100644 --- a/tools/llvm-rtdyld/llvm-rtdyld.cpp +++ b/tools/llvm-rtdyld/llvm-rtdyld.cpp @@ -304,8 +304,7 @@ static int printLineInfoForInput(bool LoadObjects, bool UseDebugObj) { // symbol in memory (rather than that in the unrelocated object file) // and use that to query the DWARFContext. if (!UseDebugObj && LoadObjects) { - object::section_iterator Sec(SymbolObj->section_end()); - Sym.getSection(Sec); + object::section_iterator Sec = *Sym.getSection(); StringRef SecName; Sec->getName(SecName); uint64_t SectionLoadAddress = |