aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/XCOFFObjectFile.cpp
diff options
context:
space:
mode:
authoresmeyi <esme.yi@ibm.com>2022-01-17 00:28:25 -0500
committeresmeyi <esme.yi@ibm.com>2022-01-17 00:28:25 -0500
commit61106ca7525663ec2ed08c5f304d6fb6946744f7 (patch)
treeb59afb772e8260e76c58b6fec2f171d5aa58302c /llvm/lib/Object/XCOFFObjectFile.cpp
parent769057a5d04d61a558dac219b23f54f905d1ef34 (diff)
downloadllvm-61106ca7525663ec2ed08c5f304d6fb6946744f7.zip
llvm-61106ca7525663ec2ed08c5f304d6fb6946744f7.tar.gz
llvm-61106ca7525663ec2ed08c5f304d6fb6946744f7.tar.bz2
Reland https://reviews.llvm.org/D113825 after fixing the test expectations.
Diffstat (limited to 'llvm/lib/Object/XCOFFObjectFile.cpp')
-rw-r--r--llvm/lib/Object/XCOFFObjectFile.cpp6
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();