diff options
Diffstat (limited to 'llvm/lib/Object/XCOFFObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/XCOFFObjectFile.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Object/XCOFFObjectFile.cpp b/llvm/lib/Object/XCOFFObjectFile.cpp index 9b0a5ef..f2f6d70 100644 --- a/llvm/lib/Object/XCOFFObjectFile.cpp +++ b/llvm/lib/Object/XCOFFObjectFile.cpp @@ -1112,8 +1112,12 @@ bool XCOFFSymbolRef::isFunction() const { return true; Expected<XCOFFCsectAuxRef> ExpCsectAuxEnt = getXCOFFCsectAuxRef(); - if (!ExpCsectAuxEnt) + if (!ExpCsectAuxEnt) { + // If we could not get the CSECT auxiliary entry, then treat this symbol as + // if it isn't a function. Consume the error and return `false` to move on. + consumeError(ExpCsectAuxEnt.takeError()); return false; + } const XCOFFCsectAuxRef CsectAuxRef = ExpCsectAuxEnt.get(); |